joyce8/EMBER2024-capa huggingface dataset:
Function at 0x52a523
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0xc62148]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.004fa790
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.004fa790
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x52a59a
cmp word [ecx], dx
je 0x52a59a
mov eax, dword [0x5733bc]
push edi
dec eax
push eax
push 0x5732a8
call fcn.0052a713
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x52a60d
cmp word [eax], dx
je 0x52a60d
mov eax, dword [edi]
test eax, eax
je 0x52a5be
cmp word [eax], dx
je 0x52a5be
lea eax, [ebp - 0x10]
push eax
call fcn.0052a774
jmp 0x52a5c7
lea eax, [ebp - 0x10]
push eax
call fcn.0052aa62
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x52a637
mov eax, dword [0x5732a4]
push dword [ebp - 0x14]
dec eax
push eax
push 0x572f98
call fcn.0052a713
add esp, 0xc
test al, al
je 0x52a637
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x52a602
cmp word [eax], di
je 0x52a602
lea eax, [ebp - 0x10]
push eax
call fcn.0052a774
pop ecx
jmp 0x52a639
lea eax, [ebp - 0x10]
push eax
call fcn.0052aa62
jmp 0x52a5ff
mov eax, dword [edi]
test eax, eax
je 0x52a624
cmp word [eax], dx
je 0x52a624
lea eax, [ebp - 0x10]
push eax
call fcn.0052ab96
pop ecx
jmp 0x52a637
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x52a702
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.0052ac88
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x52a702
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x52a702
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x52a702
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x52a68f
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.004fb187
test ebx, ebx
je 0x52a6fd
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.004fb187
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x52a702
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x52a702
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.004f0bdb
add esp, 0x10
xor eax, eax
inc eax
jmp 0x52a704
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0050c72a
leave
ret
Function at 0x52ad8e
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.004fa790
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x52adfd
cmp esi, dword [ebp - 4]
je 0x52adf8
cmp dword [ebp + 0xc], 0
je 0x52adf8
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x52add5
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0052ae57
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x52adff
xor eax, eax
inc eax
jmp 0x52adff
xor eax, eax
pop edi
pop esi
leave
ret

Function at 0x52ae90
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x52aebd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x52aebd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x543f76
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00543f81
Function at 0x54af88
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 0x54b025
push ebx
push esi
call fcn.0054b028
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.0052763f
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x54afd2
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x54b024
push edi
push eax
call fcn.004fa062
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x54aff2
call fcn.004fa028
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x54b023
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0052763f
add esp, 0x20
test eax, eax
jne 0x54b011
push edi
call fcn.004fa028
jmp 0x54b019
push ebx
call fcn.004fa028
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 0x5506d1
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.00550868
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x550840
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x550840
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x5507f5
jg 0x55072d
test eax, eax
je 0x5507eb
push 1
push 0x1000
call fcn.004f9fcb
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x550750
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x5507e2
push 0x8000
push ebx
call fcn.005505cb
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x550779
jg 0x550774
cmp ecx, 0x1000
jb 0x550779
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00547da8
add esp, 0x10
cmp eax, 0xffffffff
je 0x5507be
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 0x550774
jl 0x5507a5
test ecx, ecx
jne 0x550766
push dword [ebp - 0xc]
push ebx
call fcn.005505cb
push esi
call fcn.004fa028
add esp, 0xc
xor ebx, ebx
jmp 0x55084e
cmp byte [edi + 0x24], 0
je 0x5507d5
cmp dword [edi + 0x20], 5
jne 0x5507d5
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x5507e0
mov ebx, dword [edi + 0x18]
jmp 0x5507e2
xor ebx, ebx
push esi
call fcn.004fa028
pop ecx
jmp 0x55084e
test ecx, ecx
jg 0x5507b7
jl 0x5507f5
test eax, eax
jae 0x5507b7
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00525b3d
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x550815
cmp byte [edi + 0x1c], 0
je 0x5507b7
jmp 0x550846
push ebx
call fcn.0052c32d
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x5507b7
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 0x55084e
cmp byte [edi + 0x1c], 0
je 0x55084b
mov ebx, dword [edi + 0x18]
jmp 0x55084e
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00525b3d
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401b40
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ecx
mov eax, dword [esp + 0x10]
mov cl, byte [eax]
mov dl, byte [eax + 1]
push esi
mov esi, dword [esp + 0x10]
push edi
xor edi, edi
test esi, esi
jle 0x401bd9
push ebx
movzx ecx, cl
movzx esi, dl
push ebp
lea eax, [ecx + 1]
cdq
mov ecx, 0x31
idiv ecx
mov ebp, dword [0x42199c]
movzx ecx, dl
movzx eax, byte [ecx + ebp]
add eax, esi
mov byte [esp + 0x12], dl
cdq
mov esi, 0x31
idiv esi
movzx esi, dl
mov bl, byte [esi + ebp]
lea eax, [esi + ebp]
mov byte [esp + 0x13], dl
mov dl, byte [ecx + ebp]
mov byte [ecx + ebp], bl
mov byte [eax], dl
mov ebp, dword [0x42199c]
movzx edx, byte [ecx + ebp]
movzx eax, byte [esi + ebp]
add eax, edx
cdq
mov ebx, 0x31
idiv ebx
movzx eax, dl
mov dl, byte [eax + ebp]
mov eax, dword [esp + 0x18]
xor byte [edi + eax], dl
mov eax, dword [esp + 0x1c]
inc edi
cmp edi, eax
jl 0x401b62
mov cl, byte [esp + 0x12]
mov eax, dword [esp + 0x20]
mov dl, byte [esp + 0x13]
pop ebp
pop ebx
pop edi
mov byte [eax], cl
mov byte [eax + 1], dl
pop esi
pop ecx
ret

Function at 0x4020d6
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4020eb
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x4020fd
xor eax, eax
jmp 0x40212f
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x402121
cmp esi, eax
jae 0x4020f9
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x402113
cmp esi, eax
jae 0x4020f9
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop ebp
ret
Function at 0x403ed1
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.004040c0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x403f6c
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x423a08]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x403f6c
cmp eax, 1
je 0x403f8d
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x403f6c
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x403f39
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x403f68
xor eax, eax
inc eax
jmp 0x403fac
cmp edi, eax
jae 0x403f70
xor eax, eax
jmp 0x403fac
cmp eax, esi
jae 0x403f77
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x423a08]
jmp 0x403f90
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404146
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x41b5e0
call fcn.004049b8
mov edi, 0x94
mov eax, edi
call fcn.004040c0
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 [0x423a08], ecx
mov eax, dword [esi + 4]
mov dword [0x423a14], eax
mov edx, dword [esi + 8]
mov dword [0x423a18], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x423a0c], esi
cmp ecx, 2
je 0x4041a6
or esi, 0x8000
mov dword [0x423a0c], esi
shl eax, 8
add eax, edx
mov dword [0x423a10], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4041e1
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4041e1
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4041f9
cmp eax, 0x20b
je 0x4041e6
mov dword [ebp - 0x1c], esi
jmp 0x40420d
cmp dword [ecx + 0x84], 0xe
jbe 0x4041e1
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x404207
cmp dword [ecx + 0x74], 0xe
jbe 0x4041e1
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040662a
pop ecx
test eax, eax
jne 0x404221
push 0x1c
call fcn.00404122
pop ecx
call fcn.004062e5
test eax, eax
jne 0x404232
push 0x10
call fcn.00404122
pop ecx
call fcn.00408778
mov dword [ebp - 4], esi
call fcn.0040857a
test eax, eax
jge 0x40424b
push 0x1b
call fcn.004040fd
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4252d0], eax
call fcn.00408458
mov dword [0x4239f4], eax
call fcn.004083b6
test eax, eax
jge 0x404271
push 8
call fcn.004040fd
pop ecx
call fcn.00408183
test eax, eax
jge 0x404282
push 9
call fcn.004040fd
pop ecx
push 1
call fcn.00404ae9
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x404298
push eax
call fcn.004040fd
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00408126
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4042b9
movzx eax, word [ebp - 0x40]
jmp 0x4042bc
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0040db3c
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4042da
push edi
call fcn.00404c16
call fcn.00404c38
jmp 0x40430c
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004049f3
ret
Function at 0x404b53
Capabilities:
Terminate process

Disassembly:
push 8
push 0x41b638
call fcn.004049b8
push 8
call fcn.004065df
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x423a48], esi
jne 0x404b87
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x423a44], esi
mov al, byte [ebp + 0x10]
mov byte [0x423a40], al
cmp dword [ebp + 0xc], edi
jne 0x404bd1
cmp dword [0x4252c8], edi
je 0x404bc1
mov eax, dword [0x4252c4]
sub eax, 4
mov dword [0x4252c4], eax
cmp eax, dword [0x4252c8]
jb 0x404bc1
mov eax, dword [eax]
cmp eax, edi
je 0x404ba2
call eax
jmp 0x404ba2
push 0x42009c
mov eax, 0x420094
call fcn.00404ad1
pop ecx
push 0x4200a8
mov eax, 0x4200a0
call fcn.00404ad1
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x404c02
cmp dword [ebp + 0x10], edi
jne 0x404c10
mov dword [0x423a48], esi
push dword [ebp + 8]
call fcn.00404a8f
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x404c0f
push 8
call fcn.0040652a
pop ecx
ret
call fcn.004049f3
ret
Function at 0x407be9
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x407c17
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x407c1e
cmp ebx, dword [eax + 4]
jae 0x407c1e
xor eax, eax
jmp 0x407e0e
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x407c2f
xor eax, eax
inc eax
jmp 0x407e0d
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x407c45
cmp ecx, edx
jae 0x407d8a
cmp dword [eax + 4], 0
je 0x407c4e
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x407c36
cmp dword [ebp + 8], 0
je 0x407c70
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x407d8a
cmp eax, esi
jae 0x407d8a
mov eax, dword [0x423bc0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x407c95
cmp dword [esi*4 + 0x423bc8], edi
je 0x407d8e
inc esi
cmp esi, eax
jl 0x407c83
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x407e0a
cmp dword [ebp - 8], 0x1000000
jne 0x407e0a
test byte [ebp - 0xc], 0xcc
je 0x407d13
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x407e0a
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x407e0a
cmp word [eax + 0x18], 0x10b
jne 0x407e0a
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x407e0a
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x407d13
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x407d13
test byte [ecx + 0x27], 0x80
jne 0x407d8a
push 1
push 0x423c08
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x407c27
mov ecx, dword [0x423bc0]
test ecx, ecx
mov edx, ecx
jle 0x407d47
lea eax, [ecx*4 + 0x423bc4]
cmp dword [eax], edi
je 0x407d47
dec edx
sub eax, 4
test edx, edx
jg 0x407d3b
test edx, edx
jne 0x407d78
push 0xf
pop ebx
cmp ecx, ebx
jg 0x407d54
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x407d6c
lea eax, [edx*4 + 0x423bc8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x407d5a
cmp ecx, 0x10
jge 0x407d78
inc ecx
mov dword [0x423bc0], ecx
push 0
push 0x423c08
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x407c27
xor eax, eax
jmp 0x407e0d
test esi, esi
jle 0x407c27
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x423c08
call ebx
test eax, eax
jne 0x407c27
cmp dword [esi*4 + 0x423bc8], edi
je 0x407de4
mov eax, dword [0x423bc0]
lea esi, [eax - 1]
test esi, esi
jl 0x407dd2
cmp dword [esi*4 + 0x423bc8], edi
je 0x407dce
dec esi
jns 0x407dc2
test esi, esi
jge 0x407de2
cmp eax, 0x10
jge 0x407ddd
inc eax
mov dword [0x423bc0], eax
lea esi, [eax - 1]
jmp 0x407de4
je 0x407dfc
xor ecx, ecx
test esi, esi
jl 0x407dfc
lea eax, [ecx*4 + 0x423bc8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x407dea
push 0
push 0x423c08
call ebx
jmp 0x407c27
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407e12
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x420af8]
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 + 0x420ec8]
je 0x407e47
inc eax
cmp eax, 0x13
jb 0x407e38
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x420ec8]
jne 0x407f6d
mov eax, dword [0x4239fc]
cmp eax, 1
je 0x407f45
cmp eax, edx
jne 0x407e77
cmp dword [0x420af4], 1
je 0x407f45
cmp ecx, 0xfc
je 0x407f6d
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 0x407ead
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00409880
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.004047d0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x407ee1
mov eax, edi
push eax
call fcn.004047d0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x41bbd0
push edi
call fcn.0040b0e0
add esp, 0x10
push edi
call fcn.004047d0
push dword [esi + 0x420ecc]
mov ebx, eax
call fcn.004047d0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004040c0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00409880
push edi
push ebx
call fcn.00409890
push 0x41bbb0
push ebx
call fcn.00409890
push dword [esi + 0x420ecc]
push ebx
call fcn.00409890
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040afe5
add esp, 0x2c
jmp 0x407f6d
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x420ecc]
push dword [esi]
call fcn.004047d0
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.004043c7
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40aa7b
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x420af8]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x40aaac
xor eax, eax
jmp 0x40ac35
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x424f60]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40aae8
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0040c413
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40abc3
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40ac01
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x40ab4c
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40ab3d
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x40ab1d
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40ab8c
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40ab95
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40ab0e
jmp 0x40ab97
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40ac30
cmp dword [ebp - 0x6c], edi
je 0x40ac01
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40abf6
call fcn.0040563b
mov dword [eax], 9
call fcn.00405644
mov dword [eax], esi
jmp 0x40ac2b
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40abeb
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40ab97
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40ab97
push dword [ebp - 0x6c]
call fcn.0040564d
pop ecx
jmp 0x40ac2b
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40ac19
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40ac19
xor eax, eax
jmp 0x40ac33
call fcn.0040563b
mov dword [eax], 0x1c
call fcn.00405644
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40ac33
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.004043c7
add ebp, 0x3a0
leave
ret
Function at 0x40afe5
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x423e40], ebx
push esi
push edi
jne 0x40b065
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40b0a0
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x41c5d4
push edi
call esi
test eax, eax
mov dword [0x423e40], eax
je 0x40b0a0
push 0x41c5c4
push edi
call esi
push 0x41c5b0
push edi
mov dword [0x423e44], eax
call esi
cmp dword [0x423a08], 2
mov dword [0x423e48], eax
jne 0x40b065
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x423e50], eax
je 0x40b065
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x423e4c], eax
mov eax, dword [0x423e4c]
test eax, eax
je 0x40b0aa
call eax
test eax, eax
je 0x40b091
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x423e50]
test eax, eax
je 0x40b091
test byte [ebp - 8], 1
jne 0x40b0aa
cmp dword [0x423a14], 4
jb 0x40b0a4
or byte [ebp + 0x12], 0x20
jmp 0x40b0c9
xor eax, eax
jmp 0x40b0d9
or byte [ebp + 0x12], 4
jmp 0x40b0c9
mov eax, dword [0x423e44]
test eax, eax
je 0x40b0c9
call eax
mov ebx, eax
test ebx, ebx
je 0x40b0c9
mov eax, dword [0x423e48]
test eax, eax
je 0x40b0c9
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x423e40]
pop edi
pop esi
pop ebx
leave
ret