joyce8/EMBER2024-capa huggingface dataset:
Function at 0x473c60
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x26c]
push ebx
push esi
mov dword [ebp - 4], eax
mov byte [ebp - 8], dl
mov bl, cl
mov edx, 0x4dc908
lea eax, [ebp - 0x268]
call fcn.00452c00
xor eax, eax
push fcn.00473c40
push ebp
push 0x459540
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
test eax, eax
jne 0x473ca3
mov eax, 0x4f1e20
push eax
call sub.kernel32.dll_GetFileAttributesW
mov esi, eax
cmp esi, 0xffffffff
jne 0x473ceb
call sub.kernel32.dll_GetLastError
cmp eax, 0xa1
jbe 0x473cbf
clc
jmp 0x473cc6
bt dword [0x4dbf38], eax
jb 0x473cdf
mov eax, ebp
call fcn.00473d90
test al, al
je 0x473cdf
mov byte [ebp - 0x26c], 1
jmp 0x473d70
mov byte [ebp - 0x26c], 0
jmp 0x473d70
mov eax, esi
and eax, 0x10
movzx edx, byte [ebp - 8]
cmp eax, dword [edx*4 + 0x4b2f40]
sete byte [ebp - 0x26c]
mov al, bl
and al, byte [ebp - 0x26c]
je 0x473d70
and esi, 0x400
je 0x473d70
lea ebx, [ebp - 0x268]
mov edx, 0x4dc908
mov eax, ebx
call fcn.00452cc0
mov edx, ebx
mov eax, dword [ebp - 4]
xor cl, cl
call fcn.00473900
test eax, eax
je 0x473d44
sub eax, 1
je 0x473d5c
jmp 0x473d68
mov dl, byte [ebp - 8]
mov eax, dword [ebp - 0x268]
xor cl, cl
call fcn.00473c60
mov byte [ebp - 0x26c], al
jmp 0x473d70
mov byte [ebp - 0x26c], 1
jmp 0x473d70
mov byte [ebp - 0x26c], 0
nop
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.00473c40
mov al, byte [ebp - 0x26c]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x474090
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
test eax, eax
jne 0x47409c
mov eax, 0x4f1e20
push eax
call sub.kernel32.dll_GetFileAttributesW
mov esp, ebp
pop ebp
ret

Function at 0x4740b0
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push edx
test eax, eax
jne 0x4740be
mov eax, 0x4f1e20
push eax
call sub.kernel32.dll_SetFileAttributesW
test eax, eax
je 0x4740cc
xor ebx, ebx
jmp 0x4740d3
call sub.kernel32.dll_GetLastError
mov ebx, eax
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x474160
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0xc]
push ebx
push esi
push edi
mov edi, eax
mov esi, edx
mov dword [ebp - 8], ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], 0
xor eax, eax
push fcn.00474150
push ebp
push 0x459540
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoW
mov ebx, eax
test ebx, ebx
jle 0x4741d0
lea edx, [ebx - 1]
lea eax, [ebp - 4]
call fcn.0044f910
cmp ebx, 1
jle 0x4741c0
push ebx
mov eax, dword [ebp - 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoW
mov ebx, eax
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
xor dx, dx
call fcn.0044f160
jmp 0x4741db
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.0044ce80
xor edx, edx
pop eax
add esp, 0xc
mov dword fs:[edx], eax
mov eax, ebp
call fcn.00474150
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4745e0
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x10]
push ebx
push esi
mov dword [ebp - 0x10], 0
xor eax, eax
push fcn.004745d0
push ebp
push 0x459540
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea esi, [esi]
add ebx, 1
lea eax, [ebx*4 + 0x4f32fc]
xor edx, edx
call fcn.0044ce80
mov dword [ebx*4 + 0x4f331c], 0xffffffff
cmp ebx, 7
jl 0x474608
call sub.kernel32.dll_GetThreadLocale
mov esi, eax
push 0xb
lea eax, [ebp - 0xc]
push eax
push 0x100b
push esi
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x474694
lea esi, [esi]
push 1
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
xor cx, cx
mov edx, 0xa
call fcn.0044d880
mov eax, dword [ebp - 0x10]
mov edx, 1
call fcn.0046a630
mov ebx, eax
sub eax, 3
cmp eax, 3
jae 0x474694
push 4
push ebx
push esi
mov eax, 0x4744b0
push eax
call sub.kernel32.dll_EnumCalendarInfoA
push 3
push ebx
push esi
mov eax, 0x474540
push eax
call sub.kernel32.dll_EnumCalendarInfoA
nop
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.004745d0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x474cc0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
xor esi, esi
call sub.kernel32.dll_GetEnvironmentStringsA
mov ebx, eax
mov edi, ebx
test edi, edi
je 0x474cf0
jmp 0x474ce9
add esi, 1
mov eax, edi
call fcn.00448e30
add eax, edi
add eax, 1
mov edi, eax
cmp byte [edi], 0
jne 0x474cd8
mov esi, esi
push ebx
call sub.kernel32.dll_FreeEnvironmentStringsA
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x474d00
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 4]
push ebx
push esi
push edi
mov esi, eax
mov dword [ebp - 4], edx
mov eax, edx
xor edx, edx
call fcn.0044ce80
call sub.kernel32.dll_GetEnvironmentStringsA
mov edi, eax
mov ebx, edi
test ebx, ebx
je 0x474d64
jmp 0x474d39
sub esi, 1
mov eax, ebx
call fcn.00448e30
add eax, ebx
add eax, 1
mov ebx, eax
cmp byte [ebx], 0
je 0x474d43
cmp esi, 1
jg 0x474d28
cmp byte [ebx], 0
je 0x474d64
mov ecx, dword [ebp - 4]
mov eax, ebx
xor dx, dx
call fcn.0044d7e0
mov eax, dword [ebp - 4]
xor cl, cl
mov dx, 1
call fcn.0044e500
nop
mov eax, edi
push eax
call sub.kernel32.dll_FreeEnvironmentStringsA
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x474da0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x94]
mov dword [0x4f3360], 0
mov dword [ebp - 0x94], 0x94
lea eax, [ebp - 0x94]
push eax
call sub.kernel32.dll_GetVersionExA
mov eax, dword [ebp - 0x84]
mov dword [0x4f31c0], eax
mov eax, dword [ebp - 0x90]
mov dword [0x4f31d0], eax
mov eax, dword [ebp - 0x8c]
mov dword [0x4f31e0], eax
mov eax, dword [ebp - 0x88]
mov dword [0x4f31f0], eax
mov edx, 0x4f3201
lea eax, [ebp - 0x80]
mov ecx, pe_nt_image_headers32
call fcn.00447cd0
lea eax, [ebp - 0x80]
call fcn.00448e30
mov byte [0x4f3200], al
mov eax, 0x4dbfe8
push eax
call sub.kernel32.dll_GetModuleHandleA
mov dword [0x4f3370], eax
test eax, eax
je 0x474e40
mov eax, 0x4dbff4
push eax
push dword [0x4f3370]
call sub.kernel32.dll_GetProcAddress
mov dword [0x4f3360], eax
nop
cmp dword [0x4f31d0], 6
jae 0x474e54
mov dword [0x4b2800], 0
nop
cmp dword [0x4f31d0], 6
jb 0x474e70
cmp dword [0x4f31e0], 1
jb 0x474e70
mov dword [0x4b2810], 2
mov esp, ebp
pop ebp
ret

Function at 0x475b00
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov esi, eax
mov eax, 0xffffffff
mov edx, esi
test esi, esi
je 0x475b16
mov edx, dword [edx - 4]
test edx, edx
jle 0x475b58
mov ebx, esi
test esi, esi
je 0x475b23
mov ebx, dword [ebx - 4]
cmp ebx, 1
jl 0x475b58
xor ecx, ecx
lea esi, [esi]
add ecx, 1
movzx edx, byte [esi + ecx - 1]
xor edx, eax
and edx, 0xff
mov edi, eax
shr edi, 8
and edi, 0xffffff
xor edi, dword [edx*4 + 0x4b2f60]
mov eax, edi
cmp ebx, ecx
jg 0x475b30
not eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x475b70
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
and edx, 0xff
mov ecx, dword [eax + 0xc]
xor edx, ecx
and edx, 0xff
shr ecx, 8
and ecx, 0xffffff
xor ecx, dword [edx*4 + 0x4b2f60]
mov dword [eax + 0xc], ecx
mov esp, ebp
pop ebp
ret
Function at 0x47a490
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x118]
push ebx
push esi
push edi
mov esi, eax
mov edi, edx
mov dword [ebp - 0x118], ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x114], eax
mov al, byte [ebp + 8]
mov byte [ebp - 0x110], al
mov dword [ebp - 0xc], 0
xor eax, eax
push fcn.0047a480
push ebp
push 0x459540
push dword fs:[eax]
mov dword fs:[eax], esp
push dword [ebp - 0x114]
push dword [ebp - 0x118]
push edi
call sub.kernel32.dll_FindResourceA
mov dword [esi + 0x10], eax
test eax, eax
jne 0x47a5a0
mov al, byte [ebp - 0x110]
test al, al
je 0x47a569
push 0xff
mov eax, dword [ebp - 0x118]
lea ecx, [ebp - 0x10c]
mov edx, 0xffffffff
call fcn.004493f0
lea ecx, [ebp - 0xc]
xor dx, dx
lea eax, [ebp - 0x10c]
call fcn.0044d710
xor cl, cl
xor dx, dx
lea eax, [ebp - 0xc]
call fcn.0044e500
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0xb
lea eax, [ebp - 8]
push eax
push 0
mov ecx, dword [str.Resource___s__not_found]
mov edx, 1
mov eax, 0x4de1e0
call fcn.004727b0
mov edx, 0x47a4fa
mov ecx, ebp
call fcn.004593e0
jmp 0x47a5a0
mov eax, dword [ebp - 0x118]
mov dword [ebp - 4], eax
mov dword [ebp - 8], 6
lea eax, [ebp - 8]
push eax
push 0
mov ecx, dword [str.Resource___s__not_found]
mov edx, 1
mov eax, 0x4de1e0
call fcn.004727b0
mov edx, 0x47a569
mov ecx, ebp
call fcn.004593e0
push dword [esi + 0x10]
push edi
call sub.kernel32.dll_LoadResource
mov dword [esi + 0x14], eax
test eax, eax
jne 0x47a664
mov al, byte [ebp - 0x110]
test al, al
je 0x47a62d
push 0xff
mov eax, dword [ebp - 0x118]
lea ecx, [ebp - 0x10c]
mov edx, 0xffffffff
call fcn.004493f0
lea ecx, [ebp - 0xc]
xor dx, dx
lea eax, [ebp - 0x10c]
call fcn.0044d710
xor cl, cl
xor dx, dx
lea eax, [ebp - 0xc]
call fcn.0044e500
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0xb
lea eax, [ebp - 8]
push eax
push 0
mov ecx, dword [str.Resource___s__not_found]
mov edx, 1
mov eax, 0x4de1e0
call fcn.004727b0
mov edx, 0x47a5be
mov ecx, ebp
call fcn.004593e0
jmp 0x47a664
mov eax, dword [ebp - 0x118]
mov dword [ebp - 4], eax
mov dword [ebp - 8], 6
lea eax, [ebp - 8]
push eax
push 0
mov ecx, dword [str.Resource___s__not_found]
mov edx, 1
mov eax, 0x4de1e0
call fcn.004727b0
mov edx, 0x47a62d
mov ecx, ebp
call fcn.004593e0
push dword [esi + 0x10]
push edi
call sub.kernel32.dll_SizeofResource
mov ebx, eax
push dword [esi + 0x14]
call sub.kernel32.dll_LockResource
mov edx, eax
mov eax, esi
mov ecx, ebx
call fcn.0047a080
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.0047a480
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x47fc50
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, eax
push dword [ebx + 4]
call sub.kernel32.dll_ResumeThread
cmp eax, 1
jne 0x47fc6c
mov dword [ebx + 0xc], 0
mov esi, esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x496460
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x24]
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
mov byte [ebp - 0xc], cl
push 4
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call sub.kernel32.dll_GetLocaleInfoW
mov dword [ebp - 0x1c], eax
cmp eax, 2
jle 0x49650a
mov eax, dword [ebp - 0x1c]
sub eax, 2
test eax, eax
jl 0x496526
mov dword [ebp - 0x20], 0xffffffff
lea esi, [esi]
mov edx, dword [ebp - 0x20]
add edx, 1
mov dword [ebp - 0x20], edx
mov dx, word [ebp + edx*2 - 0x18]
mov word [ebp - 0x24], dx
mov edx, dword [ebp - 0x20]
mov dx, word [ebp + edx*2 - 0x18]
cmp dx, 0x20
jb 0x496526
sub dx, 0x20
je 0x496500
sub dx, 0x80
je 0x496500
sub dx, 0x1f62
jb 0x496526
sub dx, 1
jbe 0x496500
sub dx, 6
je 0x496500
sub dx, 0x26
jne 0x496526
nop
jmp 0x496500
cmp eax, dword [ebp - 0x20]
jg 0x4964a8
lea esi, [esi]
jmp 0x496526
cmp dword [ebp - 0x1c], 2
jne 0x49651a
mov ax, word [ebp - 0x18]
mov word [ebp - 0x24], ax
jmp 0x496526
mov al, byte [ebp - 0xc]
call fcn.0044f5b0
mov word [ebp - 0x24], ax
mov ax, word [ebp - 0x24]
sub ax, 0x7f
jbe 0x4965a4
sub ax, 0x21
je 0x4965b8
sub ax, 0x17
je 0x4965c4
sub ax, 0x222
je 0x4965d0
sub ax, 0x392
je 0x4965d8
sub ax, 1
je 0x4965e0
sub ax, 0x1996
je 0x4965e8
sub ax, 1
je 0x4965f0
sub ax, 6
je 0x4965f8
sub ax, 0xb
je 0x496608
sub ax, 0x1b
je 0x496600
sub ax, 0x367
je 0x496610
jmp 0x496618
mov ax, word [ebp - 0x24]
call fcn.0044f650
mov byte [ebp - 0x10], al
jmp 0x496620
mov byte [ebp - 0x10], 0x20
jmp 0x496620
mov byte [ebp - 0x10], 0x2e
jmp 0x496620
mov byte [ebp - 0x10], 0x27
jmp 0x496620
mov byte [ebp - 0x10], 0x2c
jmp 0x496620
mov byte [ebp - 0x10], 0x27
jmp 0x496620
mov byte [ebp - 0x10], 0x20
jmp 0x496620
mov byte [ebp - 0x10], 0x20
jmp 0x496620
mov byte [ebp - 0x10], 0x20
jmp 0x496620
mov byte [ebp - 0x10], 0x20
jmp 0x496620
mov byte [ebp - 0x10], 0x2d
jmp 0x496620
mov byte [ebp - 0x10], 0x27
jmp 0x496620
mov al, byte [ebp - 0xc]
mov byte [ebp - 0x10], al
mov esi, esi
mov al, byte [ebp - 0x10]
mov esp, ebp
pop ebp
ret

Function at 0x4a8c60
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov edx, eax
xor eax, eax
lea ebx, [edx + 1]
movzx ecx, byte [edx]
add ecx, 1
and ecx, 0xff
add edx, ecx
jmp 0x4a8c91
mov ecx, eax
shl ecx, 5
sub ecx, eax
movzx esi, byte [ebx]
xor ecx, esi
mov eax, ecx
add ebx, 1
cmp edx, ebx
ja 0x4a8c80
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4aaa20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x10]
push ebx
push esi
push edi
mov edi, eax
mov eax, dword [edi + 0x20]
mov dword [ebp - 8], eax
lea esi, [esi]
mov edx, edi
mov eax, dword [edx + 0x30]
mov ecx, dword [edx + 0x68]
sub eax, ecx
sub eax, dword [edx + 0x60]
mov dword [ebp - 4], eax
test eax, eax
jne 0x4aaa65
mov eax, edi
cmp dword [eax + 0x60], 0
jne 0x4aaa65
cmp dword [eax + 0x68], 0
jne 0x4aaa65
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
jmp 0x4aab54
cmp dword [ebp - 4], 0xffffffff
jne 0x4aaa74
sub dword [ebp - 4], 1
jmp 0x4aab54
mov eax, dword [ebp - 8]
xor edx, edx
mov ecx, eax
mov eax, edx
mov edx, ecx
mov esi, eax
sub edx, 0x106
sbb esi, 0
add edx, ecx
adc esi, eax
mov eax, dword [edi + 0x60]
xor ecx, ecx
cmp esi, ecx
jl 0x4aaaa5
jg 0x4aab54
cmp edx, eax
ja 0x4aab54
mov eax, dword [edi + 0x2c]
add eax, dword [ebp - 8]
mov edx, dword [edi + 0x2c]
mov ecx, dword [ebp - 8]
call fcn.00447cd0
mov eax, dword [ebp - 8]
sub dword [edi + 0x64], eax
mov eax, dword [ebp - 8]
sub dword [edi + 0x60], eax
mov eax, dword [ebp - 8]
sub dword [edi + 0x50], eax
mov ebx, dword [edi + 0x40]
mov eax, dword [edi + 0x38]
lea eax, [eax + ebx*2]
mov dword [ebp - 0x10], eax
lea esi, [esi]
sub dword [ebp - 0x10], 2
mov eax, dword [ebp - 0x10]
movzx edx, word [eax]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0xc]
ja 0x4aaafb
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
mov word [edx], ax
jmp 0x4aab03
mov eax, dword [ebp - 0x10]
mov word [eax], 0
sub ebx, 1
jne 0x4aaad8
mov ebx, dword [ebp - 8]
mov eax, dword [edi + 0x34]
lea eax, [eax + ebx*2]
mov dword [ebp - 0x10], eax
lea esi, [esi]
sub dword [ebp - 0x10], 2
mov eax, dword [ebp - 0x10]
movzx edx, word [eax]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0xc]
ja 0x4aab3b
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
mov word [eax], dx
jmp 0x4aab43
mov eax, dword [ebp - 0x10]
mov word [eax], 0
sub ebx, 1
jne 0x4aab18
mov eax, dword [ebp - 4]
add eax, dword [ebp - 8]
mov dword [ebp - 4], eax
lea esi, [esi]
mov eax, dword [edi]
cmp dword [eax + 4], 0
je 0x4aabc3
mov eax, edi
mov edx, dword [eax + 0x2c]
mov ecx, dword [eax + 0x60]
mov eax, dword [eax + 0x68]
add eax, ecx
add edx, eax
mov eax, dword [edi]
mov ecx, dword [ebp - 4]
call fcn.004aa6a0
mov ebx, eax
add dword [edi + 0x68], ebx
cmp dword [edi + 0x68], 3
jb 0x4aabac
mov eax, edi
mov edx, dword [eax + 0x2c]
mov eax, dword [eax + 0x60]
movzx eax, byte [edx + eax]
mov dword [edi + 0x3c], eax
mov eax, edi
mov edx, dword [eax + 0x2c]
mov ecx, dword [eax + 0x60]
movzx edx, byte [edx + ecx + 1]
mov esi, dword [eax + 0x3c]
mov ecx, dword [eax + 0x4c]
shl esi, cl
xor edx, esi
and edx, dword [eax + 0x48]
mov dword [edi + 0x3c], edx
mov eax, edi
cmp dword [eax + 0x68], 0x106
jae 0x4aabc3
mov eax, dword [eax]
cmp dword [eax + 4], 0
jne 0x4aaa38
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402f2b
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x409248
call fcn.00404164
mov edi, 0x94
mov eax, edi
call fcn.00402de0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x40b438], ecx
mov eax, dword [esi + 4]
mov dword [0x40b444], eax
mov edx, dword [esi + 8]
mov dword [0x40b448], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40b43c], esi
cmp ecx, 2
je 0x402f8b
or esi, 0x8000
mov dword [0x40b43c], esi
shl eax, 8
add eax, edx
mov dword [0x40b440], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x402fc6
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x402fc6
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x402fde
cmp eax, 0x20b
je 0x402fcb
mov dword [ebp - 0x1c], esi
jmp 0x402ff2
cmp dword [ecx + 0x84], 0xe
jbe 0x402fc6
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x402fec
cmp dword [ecx + 0x74], 0xe
jbe 0x402fc6
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00404110
pop ecx
test eax, eax
jne 0x40301e
cmp dword [0x40b428], 1
jne 0x40300b
call fcn.004038c5
push 0x1c
call fcn.0040374e
push 0xff
call fcn.0040326a
pop ecx
pop ecx
call fcn.0040406e
mov dword [ebp - 4], esi
call fcn.00403ec3
test eax, eax
jge 0x403037
push 0x1b
call fcn.00402f06
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40b9b4], eax
call fcn.00403da1
mov dword [0x40b420], eax
call fcn.00403cff
test eax, eax
jge 0x40305d
push 8
call fcn.00402f06
pop ecx
call fcn.00403acc
test eax, eax
jge 0x40306e
push 9
call fcn.00402f06
pop ecx
push 1
call fcn.0040329a
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x403084
push eax
call fcn.00402f06
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00403a6f
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4030a5
movzx eax, word [ebp - 0x40]
jmp 0x4030a8
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401f10
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4030c6
push edi
call fcn.004033c5
call fcn.004033e7
jmp 0x4030f8
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040419f
ret
Function at 0x403304
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40b478], esi
push edi
jne 0x403324
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x40b474], esi
mov byte [0x40b470], al
jne 0x40338a
mov ecx, dword [0x40b9a8]
test ecx, ecx
je 0x40336b
mov eax, dword [0x40b9a4]
sub eax, 4
cmp eax, ecx
jmp 0x403364
mov eax, dword [eax]
test eax, eax
je 0x403356
call eax
mov eax, dword [0x40b9a4]
sub eax, 4
cmp eax, dword [0x40b9a8]
mov dword [0x40b9a4], eax
jae 0x40334e
mov eax, 0x40b01c
mov esi, 0x40b020
cmp eax, esi
mov edi, eax
jae 0x40338a
mov eax, dword [edi]
test eax, eax
je 0x403383
call eax
add edi, 4
cmp edi, esi
jb 0x40337b
mov eax, 0x40b024
mov esi, 0x40b028
cmp eax, esi
mov edi, eax
jae 0x4033a9
mov eax, dword [edi]
test eax, eax
je 0x4033a2
call eax
add edi, 4
cmp edi, esi
jb 0x40339a
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x4033c3
push dword [ebp + 8]
mov dword [0x40b478], 1
call fcn.0040326a
pop ebp
ret

Function at 0x4035a1
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4035c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404ac0
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x4035e2
test byte [esp + 8], 2
je 0x4035e2
mov dword [0x40b42c], 0xd
mov dword [0x40b430], 5
jmp 0x4035bd
xor eax, eax
ret
Function at 0x40374e
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40b2f0]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x40b050]
je 0x403783
inc eax
cmp eax, 0x13
jb 0x403774
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40b050]
jne 0x4038a9
mov eax, dword [0x40b428]
cmp eax, 1
je 0x403881
cmp eax, edx
jne 0x4037b3
cmp dword [0x40b034], 1
je 0x403881
cmp ecx, 0xfc
je 0x4038a9
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4037e9
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00404360
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.004044b0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40381d
mov eax, edi
push eax
call fcn.004044b0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x409690
push edi
call fcn.00404cf0
add esp, 0x10
push edi
call fcn.004044b0
push dword [esi + 0x40b054]
mov ebx, eax
call fcn.004044b0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00402de0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00404360
push edi
push ebx
call fcn.00404370
push 0x409670
push ebx
call fcn.00404370
push dword [esi + 0x40b054]
push ebx
call fcn.00404370
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00404bee
add esp, 0x2c
jmp 0x4038a9
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40b054]
push dword [esi]
call fcn.004044b0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00404e45
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret