joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403000
Capabilities:
Accept command line arguments

Disassembly:
sub esp, 8
push str.VCINSTALLDIR
call fcn.0040b03b
add esp, 4
test eax, eax
je 0x40302a
push dword [esp + 0x10]
push dword [esp + 0x10]
call fcn.00403600
add esp, 8
xor eax, eax
add esp, 8
ret
push ebx
push ebp
push esi
lea eax, [esp + 0xc]
push edi
push eax
call fcn.00402c90
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, dword [esp + 0x10]
mov ebp, eax
lea eax, [edi + 2]
nop word [eax + eax]
mov cx, word [edi]
add edi, 2
test cx, cx
jne 0x403050
sub edi, eax
xor esi, esi
sar edi, 1
test ebp, ebp
je 0x40307f
mov esi, ebp
lea ecx, [esi + 2]
nop word [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x403070
sub esi, ecx
sar esi, 1
lea eax, [esi + edi]
lea eax, [eax*2 + 0x16]
push eax
call fcn.0040a91a
mov ebx, eax
lea ecx, [edi + edi]
push ecx
push dword [esp + 0x18]
mov eax, 0x22
lea ecx, [ebx + 2]
mov word [ebx], ax
push ecx
call fcn.00408330
movups xmm0, xmmword [str.__x86_]
add esp, 0x10
movups xmmword [ebx + edi*2 + 2], xmm0
mov ax, word [0x426094]
mov word [ebx + edi*2 + 0x12], ax
test ebp, ebp
je 0x4030dc
lea eax, [esi + esi]
push eax
lea eax, [edi + 0xa]
lea eax, [ebx + eax*2]
push ebp
push eax
call fcn.00408330
add esp, 0xc
lea eax, [esi + edi]
xor ecx, ecx
push ebx
push 0x426098
mov word [ebx + eax*2 + 0x14], cx
call fcn.004035d0
push ebx
call fcn.0040aa40
push ebx
call fcn.0040a8ff
push dword [esp + 0x20]
call fcn.0040a8ff
push dword [esp + 0x28]
call fcn.0040a8ff
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret

Function at 0x4032c0
Capabilities:
Move file

Disassembly:
push 1
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x4032d5
ret
call fcn.00401000
push eax
push dword [esp + 0xc]
push dword [esp + 0xc]
push str.could_not_rename__s_to__s:__s
call fcn.004010a0
int3
Function at 0x4032f0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4034b8
test al, 0x10
je 0x4034b8
push esi
push ebx
call fcn.00403120
mov esi, eax
add esp, 4
test esi, esi
je 0x403505
push ebp
push edi
call fcn.0040a6dd
mov ebp, dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov dword [eax], 0
cmp dword [esi + 0x144], 0
jne 0x403354
push 0x105
push 1
call fcn.0040a8f4
add esp, 8
mov dword [esi + 0x144], eax
jmp 0x403364
lea eax, [esi + 4]
push eax
push dword [esi]
call ebp
test eax, eax
je 0x403426
push 0x105
push 0
push dword [esi + 0x144]
call fcn.004088b0
push 0x104
lea eax, [esi + 0x30]
push eax
push dword [esi + 0x144]
call fcn.0040a7d0
mov edi, dword [esi + 0x144]
add esp, 0x18
test edi, edi
je 0x40343c
mov ecx, 0x4257dc
mov eax, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4033c2
test dl, dl
je 0x4033be
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4033c2
add eax, 2
add ecx, 2
test dl, dl
jne 0x4033a2
xor eax, eax
jmp 0x4033c7
sbb eax, eax
or eax, 1
test eax, eax
je 0x403334
mov ecx, 0x4257e0
mov eax, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4033f6
test dl, dl
je 0x4033f2
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4033f6
add eax, 2
add ecx, 2
test dl, dl
jne 0x4033d6
xor eax, eax
jmp 0x4033fb
sbb eax, eax
or eax, 1
test eax, eax
je 0x403334
push 0
push edi
push ebx
call fcn.00402710
push edx
push eax
push 0x4257b8
call fcn.004025c0
push eax
call fcn.004032f0
add esp, 0x1c
jmp 0x403334
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x40343c
call fcn.0040a6dd
mov dword [eax], 0x28
call fcn.0040a6dd
pop edi
pop ebp
cmp dword [eax], 0
jg 0x403520
push dword [esi]
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
jne 0x403465
call fcn.0040a6dd
mov dword [eax], 0x28
jmp 0x403481
mov eax, dword [esi + 0x144]
test eax, eax
je 0x403478
push eax
call fcn.0040a8ff
add esp, 4
push esi
call fcn.0040a8ff
add esp, 4
push ebx
call fcn.004142a1
add esp, 4
test eax, eax
jns 0x4034b5
call fcn.0040a6dd
cmp dword [eax], 2
jne 0x40353b
call fcn.0040a6dd
push ebx
push str.directory__s_does_not_exist
mov dword [eax], 0
call fcn.00401120
add esp, 8
pop esi
pop ebx
ret
push ebx
call fcn.0041422c
add esp, 4
test eax, eax
jns 0x4034b6
call fcn.0040a6dd
cmp dword [eax], 2
jne 0x4034ea
call fcn.0040a6dd
push ebx
push str.file__s_does_not_exist
mov dword [eax], 0
call fcn.00401120
add esp, 8
pop ebx
ret
call fcn.0040a6dd
push dword [eax]
call fcn.0040a7bb
add esp, 4
push eax
push ebx
push str.could_not_remove_file__s:__s
call fcn.004010a0
call fcn.0040a6dd
push dword [eax]
call fcn.0040a7bb
add esp, 4
push eax
push ebx
push str.could_not_open_directory__s:__s
call fcn.004010a0
call fcn.0040a6dd
push dword [eax]
call fcn.0040a7bb
add esp, 4
push eax
push ebx
push str.could_not_read_directory__s:__s
call fcn.004010a0
call fcn.0040a6dd
push dword [eax]
call fcn.0040a7bb
add esp, 4
push eax
push ebx
push str.could_not_remove_directory__s:__s
call fcn.004010a0
int3
Function at 0x408121
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x408160
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x408160
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x408160
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x408160
cmp dword [ecx + 0x74], 0xe
jbe 0x408160
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x40d102
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00423b00
mov eax, dword [0x42f140]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.0040c572
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x40d144
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x40d2a0
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00407510
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x430aa0]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.00419adc
mov ecx, dword [esi*4 + 0x430aa0]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x40d299
cmp eax, dword [ecx + edi + 0x24]
jne 0x40d299
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40d299
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00419adc
add esp, 0x14
test edx, edx
jl 0x40d299
jg 0x40d20f
test eax, eax
jb 0x40d299
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x40d299
jl 0x40d229
cmp dword [ebp - 0x1008], eax
ja 0x40d299
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x40d247
test ebx, ebx
je 0x40d280
cmp ecx, edi
jae 0x40d280
mov al, byte [ecx]
cmp al, 0xd
jne 0x40d261
lea eax, [edi - 1]
cmp ecx, eax
jae 0x40d26d
cmp byte [ecx + 1], 0xa
jne 0x40d26d
inc ecx
jmp 0x40d26d
movzx eax, al
movsx eax, byte [eax + 0x42f388]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x40d247
cmp edx, ebx
jne 0x40d247
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x40d29e
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00407500
leave
ret

Function at 0x4164b9
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041643b
Function at 0x417056
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x428cf8
push 0x428cf0
push str.FlsAlloc
push 0x1f
call fcn.00416e95
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41708a
push dword [ebp + 8]
mov ecx, esi
call dword [0x42518c]
call esi
jmp 0x417090
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4170d4
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x428d08
push 0x428d00
push str.FlsGetValue
push 0x21
call fcn.00416e95
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41710b
push dword [ebp + 8]
mov ecx, esi
call dword [0x42518c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x417113
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x428d10
push 0x428d08
push str.FlsSetValue
push 0x22
call fcn.00416e95
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41714d
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x42518c]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x418c00
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x430aa0]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x418c40
cmp byte [ebx], 0xa
jne 0x418c40
or byte [edi + eax + 0x28], 4
jmp 0x418c45
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x418d44
mov dl, byte [eax]
cmp dl, 0x1a
je 0x418d27
inc eax
cmp dl, 0xd
je 0x418c71
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x418c97
cmp eax, ecx
jae 0x418ca5
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x418c59
jmp 0x418d44
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x418d22
cmp dword [ebp - 0x10], 0
je 0x418d22
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x430aa0]
test byte [eax + edi + 0x28], 0x48
je 0x418cfc
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x418ce7
mov byte [esi], dl
jmp 0x418cf8
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x430aa0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x418d44
cmp byte [ebp - 1], 0xa
jne 0x418d0b
cmp esi, ebx
jne 0x418d0b
mov byte [esi], 0xa
jmp 0x418d43
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00419afa
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x418d44
mov byte [esi], 0xd
jmp 0x418d43
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x430aa0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x418d41
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x418d44
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x418d4d
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x430aa0]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x418d93
cmp word [ebx], dx
jne 0x418d93
or byte [eax + edi + 0x28], 4
jmp 0x418d98
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x418efb
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x418edb
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x418dd9
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x418e0f
cmp eax, edx
jae 0x418e1d
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x418db4
jmp 0x418efb
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x418ed6
cmp dword [ebp - 0x18], 0
je 0x418ed6
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x430aa0]
test byte [eax + edi + 0x28], 0x48
je 0x418eac
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x418e70
mov word [esi], cx
jmp 0x418ea7
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x430aa0]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x430aa0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x430aa0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x418efb
pop eax
cmp word [ebp - 4], ax
jne 0x418ebc
cmp esi, ebx
jne 0x418ebc
mov word [esi], ax
jmp 0x418ef8
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00419afa
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x418efb
push 0xd
pop eax
jmp 0x418eb7
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x430aa0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x418ef5
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x418efb
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41c7a2
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x41c83f
push ebx
push esi
call fcn.0041c76b
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0041c6ff
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x41c7ec
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41c83e
push edi
push eax
call fcn.00414ebd
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x41c80c
call fcn.00414db5
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41c83d
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0041c6ff
add esp, 0x20
test eax, eax
jne 0x41c82b
push edi
call fcn.00414db5
jmp 0x41c833
push ebx
call fcn.00414db5
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x41c842
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x41c853
pop esi
ret
push ebx
push edi
push esi
call fcn.0041c76b
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00414ebd
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x41c87b
push ebx
push esi
push edi
call fcn.00408330
add esp, 0xc
push 0
call fcn.00414db5
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x41cfd5
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041caf0
Function at 0x422391
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.0042230d
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x422500
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x422500
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4224b5
jg 0x4223ed
test eax, eax
je 0x4224ab
push 1
push 0x1000
call fcn.00414d58
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x422410
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x4224a2
push 0x8000
push ebx
call fcn.00413906
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x422439
jg 0x422434
cmp ecx, 0x1000
jb 0x422439
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.0041a442
add esp, 0x10
cmp eax, 0xffffffff
je 0x42247e
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x422434
jl 0x422465
test ecx, ecx
jne 0x422426
push dword [ebp - 0xc]
push ebx
call fcn.00413906
push esi
call fcn.00414db5
add esp, 0xc
xor ebx, ebx
jmp 0x42250e
cmp byte [edi + 0x24], 0
je 0x422495
cmp dword [edi + 0x20], 5
jne 0x422495
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x4224a0
mov ebx, dword [edi + 0x18]
jmp 0x4224a2
xor ebx, ebx
push esi
call fcn.00414db5
pop ecx
jmp 0x42250e
test ecx, ecx
jg 0x422477
jl 0x4224b5
test eax, eax
jae 0x422477
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00419afa
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4224d5
cmp byte [edi + 0x1c], 0
je 0x422477
jmp 0x422506
push ebx
call fcn.004126b1
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x422477
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x42250e
cmp byte [edi + 0x1c], 0
je 0x42250b
mov ebx, dword [edi + 0x18]
jmp 0x42250e
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00419afa
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x423940
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x42396d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x42396d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x426557
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x42657e
xor eax, eax
jmp 0x426599
test byte [ebp - 4], 0x10
je 0x426592
mov eax, 1
jmp 0x426594
xor eax, eax
jmp 0x426599
pop edi
pop esi
pop ebx
leave
ret
Function at 0x442cb0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x4570b8], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x442cce
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x4570b4], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x4570b0], bl
jne 0x442d28
cmp dword [0x487918], 0
je 0x442d16
mov edi, dword [0x487914]
sub edi, 4
cmp edi, dword [0x487918]
jb 0x442d16
mov eax, dword [edi]
test eax, eax
je 0x442d0b
call eax
sub edi, 4
cmp edi, dword [0x487918]
jae 0x442d03
push 0x450030
push 0x450028
call fcn.00442d60
add esp, 8
push 0x450038
push 0x450034
call fcn.00442d60
add esp, 8
test ebx, ebx
jne 0x442d4f
mov dword [0x4570b8], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret

Function at 0x442f30
Capabilities:
Delete file

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
mov eax, 0
jne 0x442f4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x442f5d
push eax
call fcn.004493d0
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x4437e0
Capabilities:
Create directory

Disassembly:
mov eax, dword [esp + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
mov eax, 0
jne 0x4437fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x44380f
push eax
call fcn.004493d0
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x4438b0
Capabilities:
Move file

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
mov eax, 0
jne 0x4438cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4438e2
push eax
call fcn.004493d0
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x444170
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x457350
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x444197
add eax, 8
inc ecx
cmp eax, 0x4573e0
jb 0x444188
cmp dword [ecx*8 + 0x457350], edx
lea ebx, [ecx*8]
jne 0x44435b
cmp dword [0x45705c], 1
je 0x444317
cmp dword [0x45705c], 0
jne 0x4441ce
cmp dword [0x457060], 1
je 0x444317
cmp edx, 0xfc
je 0x44435b
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x44420b
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x44424f
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x44f4e0
push ebp
call fcn.004428f0
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x44f4c0
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x457354]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.00449b40
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x486800], 0
je 0x44432d
mov eax, dword [0x486800]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x444337
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x457354]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret