joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4e99a0
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov dword [esi], eax
movzx eax, byte [edi + 4]
mov byte [esi + 4], al
movzx eax, byte [edi + 5]
mov byte [esi + 5], al
movzx eax, byte [edi + 6]
mov byte [esi + 6], al
movzx eax, byte [edi + 7]
mov byte [esi + 7], al
movzx eax, byte [edi + 8]
mov byte [esi + 8], al
movzx eax, byte [edi + 9]
mov byte [esi + 9], al
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], ecx
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x1c]
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
mov eax, dword [edi + 0x20]
mov ecx, dword [edi + 0x24]
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], ecx
lea ecx, [esi + 0x2c]
movzx eax, byte [edi + 0x28]
mov byte [esi + 0x28], al
movzx eax, byte [edi + 0x29]
mov byte [esi + 0x29], al
movzx eax, byte [edi + 0x2a]
mov byte [esi + 0x2a], al
lea eax, [edi + 0x2c]
push eax
call fcn.004e9880
lea eax, [edi + 0x38]
lea ecx, [esi + 0x38]
cmp ecx, eax
je 0x4e9a38
mov edx, dword [eax]
mov eax, dword [eax + 4]
sub eax, edx
sar eax, 2
push eax
push edx
call fcn.004e8ee0
lea eax, [edi + 0x44]
lea ecx, [esi + 0x44]
cmp ecx, eax
je 0x4e9a54
cmp dword [eax + 0x14], 0x10
mov edx, dword [eax + 0x10]
jb 0x4e9a4d
mov eax, dword [eax]
push edx
push eax
call fcn.00441420
lea eax, [edi + 0x5c]
lea ecx, [esi + 0x5c]
cmp ecx, eax
je 0x4e9a70
cmp dword [eax + 0x14], 0x10
mov edx, dword [eax + 0x10]
jb 0x4e9a69
mov eax, dword [eax]
push edx
push eax
call fcn.00441420
mov eax, dword [edi + 0x74]
mov dword [esi + 0x74], eax
mov eax, dword [edi + 0x78]
mov dword [esi + 0x78], eax
mov eax, esi
pop edi
pop esi
pop ebp
ret 4
Function at 0x4f3060
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
mov al, byte [esi + 0xc]
lea edx, [edi + 0x20]
test al, 0x60
je 0x4f3095
movzx eax, al
shr eax, 5
and eax, 3
mov ecx, dword [eax*8 + 0x519028]
or dword [edx], ecx
mov eax, dword [eax*8 + 0x51902c]
or dword [edx + 4], eax
mov al, byte [esi + 0xd]
test al, 3
je 0x4f30b5
movzx ecx, al
and ecx, 3
mov eax, dword [ecx*8 + 0x519048]
or dword [edx], eax
mov eax, dword [ecx*8 + 0x51904c]
or dword [edx + 4], eax
mov al, byte [esi + 0xd]
test al, 0xc
je 0x4f30d8
movzx ecx, al
shr ecx, 2
and ecx, 3
mov eax, dword [ecx*8 + 0x519068]
or dword [edx], eax
mov eax, dword [ecx*8 + 0x51906c]
or dword [edx + 4], eax
mov eax, dword [edi + 0xc]
jmp dword [eax*4 + 0x4f3454]

Function at 0x4f8d1e
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 2
lea eax, [ebp - 4]
push eax
push 0x20000001
push str._x_sys_default_locale
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
mov esi, dword [ebp + 0xc]
neg eax
sbb eax, eax
xor ecx, ecx
and eax, dword [ebp - 4]
push ecx
push ecx
push esi
push eax
push dword [ebp + 8]
mov dword [ebp - 4], eax
push ecx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push eax
push dword [esi]
call fcn.004f8cfa
pop esi
leave
ret 8
Function at 0x4fbb49
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x583a1c]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x4fbb94
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.004fbce4
test al, al
jne 0x4fbb8e
sub edx, 2
cmp edx, edi
jne 0x4fbb74
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x4fbbb6
lea eax, [edi + 2]
cmp edx, eax
je 0x4fbbb6
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.004fba95
add esp, 0x10
jmp 0x4fbcb0
push esi
lea ecx, [ebp - 0x255]
call fcn.004fbce4
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4fbbf9
push dword [ebp - 0x25c]
jmp 0x4fbba6
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x4fbc36
cmp word [ebp - 0x226], 0
je 0x4fbc57
cmp word [ebp - 0x226], ax
jne 0x4fbc36
cmp word [ebp - 0x224], 0
je 0x4fbc57
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.004fba95
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x4fbca3
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x4fbc10
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x4fbc8b
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x4fbcb0
push 0x4fb8c5
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004fc880
add esp, 0x10
jmp 0x4fbc80
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e3bc5
leave
ret
Function at 0x4fe441
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.004fe3bd
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4fe5b0
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4fe5b0
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4fe565
jg 0x4fe49d
test eax, eax
je 0x4fe55b
push 1
push 0x1000
call fcn.004d3998
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4fe4c0
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x4fe552
push 0x8000
push ebx
call fcn.004fa81e
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x4fe4e9
jg 0x4fe4e4
cmp ecx, 0x1000
jb 0x4fe4e9
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.004d7835
add esp, 0x10
cmp eax, 0xffffffff
je 0x4fe52e
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 0x4fe4e4
jl 0x4fe515
test ecx, ecx
jne 0x4fe4d6
push dword [ebp - 0xc]
push ebx
call fcn.004fa81e
push esi
call fcn.004d39f5
add esp, 0xc
xor ebx, ebx
jmp 0x4fe5be
cmp byte [edi + 0x24], 0
je 0x4fe545
cmp dword [edi + 0x20], 5
jne 0x4fe545
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x4fe550
mov ebx, dword [edi + 0x18]
jmp 0x4fe552
xor ebx, ebx
push esi
call fcn.004d39f5
pop ecx
jmp 0x4fe5be
test ecx, ecx
jg 0x4fe527
jl 0x4fe565
test eax, eax
jae 0x4fe527
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004da5ab
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4fe585
cmp byte [edi + 0x1c], 0
je 0x4fe527
jmp 0x4fe5b6
push ebx
call fcn.004dffd8
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4fe527
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 0x4fe5be
cmp byte [edi + 0x1c], 0
je 0x4fe5bb
mov ebx, dword [edi + 0x18]
jmp 0x4fe5be
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004da5ab
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4fe6f0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4fe71d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4fe71d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43200c
nop
nop
pop eax
nop
nop
nop
add eax, 0x40729f
nop
nop
sub eax, 0x407245
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x432030
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
jne 0x43201e
nop
nop
nop
nop
nop
nop
nop
nop
nop
popal
jmp 0x431219
Function at 0x4022f7
Capabilities:
Check os version

Disassembly:
push 0x11c
mov eax, 0x40c6bf
call fcn.0040b828
mov esi, ecx
lea eax, [esi + 0x1044]
xor ebx, ebx
mov dword [ebp - 0x128], esi
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov edi, 0x410
push edi
push ebx
push esi
mov dword [ebp - 4], ebx
call fcn.00404d00
push edi
lea eax, [esi + 0x410]
push ebx
push eax
call fcn.00404d00
push 0x400
lea eax, [esi + 0x820]
push ebx
push eax
call fcn.00404d00
push edi
lea eax, [esi + 0xc20]
push ebx
push eax
call fcn.00404d00
push 0x110
lea eax, [ebp - 0x120]
push ebx
push eax
mov byte [esi + 0x1030], bl
mov byte [esi + 0x1031], bl
mov dword [esi + 0x1034], ebx
mov byte [esi + 0x1032], bl
mov byte [esi + 0x1038], 1
mov dword [ebp - 0x124], 0x114
call fcn.00404d00
add esp, 0x3c
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x4023bc
cmp dword [ebp - 0x120], 6
jb 0x4023bc
mov byte [esi + 0x1032], 1
call fcn.004023e8
mov ecx, esi
call fcn.004031eb
mov eax, esi
call fcn.0040b8ab
ret
Function at 0x40301f
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov eax, dword [0x411034]
xor eax, ebp
mov dword [ebp + 0x398], eax
push ebx
push esi
push edi
xor ebx, ebx
push 0x40e
lea eax, [ebp - 0x76]
mov esi, ecx
push ebx
push eax
mov dword [ebp - 0x80], esi
mov word [ebp - 0x78], bx
call fcn.00404d00
add esp, 0xc
lea eax, [ebp - 0x7c]
push eax
push 0x1a
push ebx
mov dword [ebp - 0x7c], ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x403093
lea eax, [ebp - 0x78]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x40308f
cmp dword [ebp - 0x7c], ebx
je 0x403093
push dword [ebp - 0x7c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x403093
mov word [ebp - 0x78], bx
lea eax, [ebp - 0x78]
push 0x40ed08
push eax
call fcn.00404b0b
pop ecx
pop ecx
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4030b6
mov word [ebp - 0x78], bx
mov edi, 0x410
push edi
add esi, 0xc20
push ebx
push esi
call fcn.00404d00
lea eax, [ebp - 0x78]
push eax
call fcn.00404b56
add esp, 0x10
test eax, eax
jne 0x403193
mov eax, dword [ebp - 0x80]
mov eax, dword [eax + 0x1034]
cmp eax, ebx
jne 0x4030f1
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x40f
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, edi
jae 0x403193
cmp eax, ebx
je 0x403193
mov ecx, dword [ebp - 0x80]
push 0x5c
push esi
mov word [ecx + eax*2 + 0xc20], bx
call fcn.00404adb
cmp eax, ebx
pop ecx
pop ecx
jne 0x403135
push 0x2f
push esi
call fcn.00404adb
cmp eax, ebx
pop ecx
pop ecx
je 0x403139
mov word [eax + 2], bx
push str.config
push esi
call fcn.00404b0b
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403187
push 0x40ed28
push esi
call fcn.00404b0b
push 0x40ed2c
push esi
call fcn.00404b0b
add esp, 0x10
push ebx
push 0x80
push 4
push ebx
push 7
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x40318c
mov word [esi], bx
jmp 0x403193
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00404b56
test eax, eax
pop ecx
jne 0x4031d3
push 0x207
lea eax, [ebp - 0x78]
push eax
push esi
call fcn.00404d7a
push esi
call fcn.00404b56
add esp, 0x10
test eax, eax
jbe 0x4031d3
push 0x40ed28
push esi
call fcn.00404b0b
push 0x40ed2c
push esi
call fcn.00404b0b
add esp, 0x10
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004042e2
add ebp, 0x39c
leave
ret
Function at 0x4031eb
Capabilities:
Get hostname
Get session user name

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x42c
mov eax, dword [0x411034]
xor eax, esp
mov dword [esp + 0x428], eax
push ebx
push esi
push edi
mov edi, ecx
call fcn.0040301f
lea esi, [edi + 0xc20]
push esi
call fcn.00404b56
test eax, eax
pop ecx
jbe 0x40322d
lea eax, [edi + 0x1044]
push eax
push esi
call fcn.00403333
mov esi, 0x208
xor ebx, ebx
push esi
lea eax, [esp + 0x226]
push ebx
push eax
mov word [esp + 0x22c], bx
call fcn.00404d00
add esp, 0xc
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x224]
push eax
mov dword [esp + 0x14], 0x104
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
push esi
lea eax, [esp + 0x16]
push ebx
push eax
mov word [esp + 0x432], bx
mov word [esp + 0x1c], bx
call fcn.00404d00
add esp, 0xc
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x14], 0x104
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea esi, [edi + 0x1044]
mov eax, esi
mov word [esp + 0x216], bx
call fcn.00403d2b
test eax, eax
jne 0x4032db
lea eax, [esp + 0x10]
push 1
push eax
call fcn.00404b56
pop ecx
inc eax
push eax
lea eax, [esp + 0x228]
push eax
push ebx
mov edi, esi
lea ecx, [esp + 0x20]
call fcn.00402e24
jmp 0x40331e
push ebx
call fcn.00403d43
mov edi, eax
cmp byte [edi + 0x69c], 1
jne 0x403317
lea eax, [esp + 0x220]
push eax
push edi
call fcn.00404f48
test eax, eax
pop ecx
pop ecx
jne 0x403317
lea eax, [esp + 0x10]
push eax
add edi, 0x280
push edi
call fcn.00404f48
test eax, eax
pop ecx
pop ecx
je 0x40331e
mov eax, esi
call fcn.00403d65
mov ecx, dword [esp + 0x434]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004042e2
mov esp, ebp
pop ebp
ret
Function at 0x403333
Capabilities:
Read file on windows

Disassembly:
push 0x704
mov eax, 0x40c690
call fcn.0040b7bf
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x403502
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x3c], eax
je 0x403502
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
push dword [ebp + 8]
lea ecx, [ebp - 0x50]
lea edx, [ebp - 0x48]
lea esi, [ebp - 0x28]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
call fcn.00402d5a
test al, al
jne 0x4033b5
xor edi, edi
mov dword [ebp - 0x24], ebx
jmp 0x4033b8
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
mov ecx, edi
add ecx, 0xffffffff
adc eax, 0xffffffff
cmp eax, ebx
ja 0x40340c
jb 0x4033d1
cmp ecx, 0xffffe
ja 0x40340c
push edi
lea eax, [ebp - 0x1c]
call fcn.00401a3e
push ebx
lea eax, [ebp + 8]
push eax
push edi
lea esi, [ebp - 0x1c]
mov dword [ebp + 8], ebx
call fcn.00401912
push eax
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp ebx, dword [ebp - 0x24]
ja 0x40340c
jb 0x403401
cmp dword [ebp + 8], edi
jae 0x40340c
push dword [ebp + 8]
lea eax, [ebp - 0x1c]
call fcn.00401a3e
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], ebx
je 0x4034fa
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x18]
je 0x4034fa
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
lea esi, [ebp - 0x70]
mov byte [ebp - 4], 1
call fcn.004016b3
cmp dword [ebp - 0x18], ebx
jne 0x403448
xor edi, edi
jmp 0x40344e
mov edi, dword [ebp - 0x14]
sub edi, dword [ebp - 0x18]
lea esi, [ebp - 0x1c]
call fcn.00401912
push eax
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x38]
mov edx, edi
call fcn.00401747
test al, al
je 0x4034f2
cmp dword [ebp - 0x34], ebx
mov ecx, dword [ebp - 0x30]
jne 0x403479
xor eax, eax
jmp 0x40347e
mov eax, ecx
sub eax, dword [ebp - 0x34]
mov esi, 0x69d
xor edx, edx
mov edi, esi
div edi
test edx, edx
jne 0x4034f2
cmp dword [ebp - 0x34], ebx
jne 0x403496
xor ecx, ecx
jmp 0x403499
sub ecx, dword [ebp - 0x34]
xor edx, edx
mov eax, ecx
div esi
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x4034f2
lea esi, [ebp - 0x70d]
call fcn.0040229f
mov edx, dword [ebp + 0xc]
sub esp, 0x6a0
mov esi, eax
mov edi, esp
mov ecx, 0x1a7
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.00403d9b
imul esi, esi, 0x69d
push esi
lea esi, [ebp - 0x38]
call fcn.00401912
mov esi, dword [ebp + 0xc]
push eax
push ebx
call fcn.00403d43
push eax
call fcn.00404540
add esp, 0xc
lea esi, [ebp - 0x38]
call fcn.00403d10
lea esi, [ebp - 0x1c]
call fcn.00403d10
call fcn.0040b897
ret 8
Function at 0x403ca0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 4
mov eax, 0x40c788
call fcn.0040b7bf
mov edi, ecx
mov esi, 0x412da8
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
and dword [ebp - 4], 0
test edi, edi
je 0x403cec
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403cec
test al, 0x10
jne 0x403cec
mov ecx, dword [ebp + 8]
mov edx, edi
call fcn.004038ca
test al, al
push edi
jne 0x403cfd
push dword [ebp + 8]
call fcn.00403ab6
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
call fcn.0040b897
ret 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
jmp 0x403cf5

Function at 0x4042e2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x411034]
jne 0x4042ec
repz ret
jmp fcn.00405261

Function at 0x407417
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x4117f0]
je 0x407432
inc edi
cmp edi, 0x17
jb 0x407423
cmp edi, 0x17
jae 0x4075b2
push ebp
push 3
call fcn.0040a610
cmp eax, 1
pop ecx
je 0x40757e
push 3
call fcn.0040a610
test eax, eax
pop ecx
jne 0x407466
cmp dword [0x411030], 1
je 0x40757e
cmp ebx, 0xfc
je 0x4075b1
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x4121d0
push ebp
call fcn.00405f68
add esp, 0xc
test eax, eax
je 0x40749c
push esi
push esi
push esi
push esi
push esi
call fcn.00404405
add esp, 0x14
push 0x104
mov esi, 0x4121e9
push esi
push 0
mov byte [0x4122ed], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4074e0
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00405f68
add esp, 0xc
test eax, eax
je 0x4074e0
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00404405
add esp, 0x14
push esi
call fcn.00404370
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x407525
push esi
call fcn.00404370
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x4124e4
push 0x40d8a4
sub ecx, eax
push ecx
push eax
call fcn.0040a036
add esp, 0x14
test eax, eax
je 0x407525
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00404405
add esp, 0x14
jmp 0x407527
xor esi, esi
push 0x40d8a0
push ebx
push ebp
call fcn.00409f70
add esp, 0xc
test eax, eax
je 0x407547
push esi
push esi
push esi
push esi
push esi
call fcn.00404405
add esp, 0x14
push dword [edi*8 + 0x4117f4]
push ebx
push ebp
call fcn.00409f70
add esp, 0xc
test eax, eax
je 0x407569
push esi
push esi
push esi
push esi
push esi
call fcn.00404405
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.0040a453
add esp, 0xc
jmp 0x4075b1
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x4075b1
cmp ebp, 0xffffffff
je 0x4075b1
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4117f4]
push dword [esi]
call fcn.00404370
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x40a453
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00405495
xor ebx, ebx
cmp dword [0x4128d0], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x40a529
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40a609
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x40a609
push eax
call fcn.00405427
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x4128d0], eax
call esi
push eax
call fcn.00405427
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x4128d4], eax
call esi
push eax
call fcn.00405427
mov dword [0x4128d8], eax
lea eax, [ebp - 0xc]
push eax
call fcn.00406402
test eax, eax
pop ecx
pop ecx
je 0x40a4f7
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00404405
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x40a529
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00405427
cmp eax, ebx
pop ecx
mov dword [0x4128e0], eax
je 0x40a529
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00405427
pop ecx
mov dword [0x4128dc], eax
mov eax, dword [0x4128dc]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x40a5ae
cmp dword [0x4128e0], ecx
je 0x40a5ae
push eax
call fcn.0040549e
push dword [0x4128e0]
mov esi, eax
call fcn.0040549e
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x40a5ae
cmp edi, ebx
je 0x40a5ae
call esi
cmp eax, ebx
je 0x40a57b
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40a57b
test byte [ebp - 0x18], 1
jne 0x40a5ae
lea eax, [ebp - 0x10]
push eax
call fcn.00406439
test eax, eax
pop ecx
je 0x40a596
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00404405
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x40a5a5
or dword [ebp + 0x10], 0x200000
jmp 0x40a5e9
or dword [ebp + 0x10], 0x40000
jmp 0x40a5e9
mov eax, dword [0x4128d4]
cmp eax, dword [ebp - 8]
je 0x40a5e9
push eax
call fcn.0040549e
cmp eax, ebx
pop ecx
je 0x40a5e9
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40a5e9
mov eax, dword [0x4128d8]
cmp eax, dword [ebp - 8]
je 0x40a5e9
push eax
call fcn.0040549e
cmp eax, ebx
pop ecx
je 0x40a5e9
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4128d0]
call fcn.0040549e
cmp eax, ebx
pop ecx
je 0x40a609
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40a60b
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret