joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10020a18
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x10059013
call fcn.10057e90
sub esp, 0x24
push ebx
push esi
push edi
mov dword [ebp - 0x24], 0x5378
mov edi, edx
mov ebx, ecx
mov dword [ebp - 0x10], esp
xor esi, esi
mov dword [ebp - 0x28], edi
cmp dword [ebp - 0x24], 0x5486
mov dword [ebp - 0x18], ebx
jle 0x10020ab9
mov ebx, esi
mov dword [ebp - 0x20], esi
mov ecx, esi
mov dword [ebp - 0x1c], esi
mov eax, ebx
mov dword [ebp - 0x14], esi
cdq
idiv ecx
mov ebx, edx
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x2c], esi
mov eax, ebx
mov ecx, 0x10073038
xor eax, esi
xor eax, edi
cdq
push edx
push eax
call fcn.10004272
inc esi
cmp esi, 0x59f3
jl 0x10020a61
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
push 0
pop esi
cmp eax, 0xb23
jl 0x10020a5b
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
inc ecx
mov dword [ebp - 0x1c], ecx
cmp ecx, 0x6eb2
jl 0x10020a51
inc ebx
mov dword [ebp - 0x20], ebx
cmp ebx, 0x4efa
jl 0x10020a4c
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 4], esi
cmp dword [ebp - 0x24], 0x51cf
jge 0x10020ad4
mov edx, str.jknalpa_nuq_dlkdmagf_jlyzfz_wobkred
mov ecx, 0x10073038
call fcn.100062fd
or dword [ebp - 4], 0xffffffff
cmp byte [ebp + 0xc], 0
je 0x10020b9d
xor ecx, ecx
inc ecx
mov dword [edi], ecx
cmp dword [edi], esi
jl 0x10020ba6
mov eax, dword [ebp + 0x20]
mov dword [eax], esi
jmp 0x10020b8d
mov dword [ebx], ecx
cmp dword [ebx], esi
jl 0x10020b8b
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x14], esi
cmp dword [ebp - 0x14], ecx
jg 0x10020b82
mov ebx, dword [ebp + 0x20]
push 0x2aa5
push 0x2c1e
push ecx
push ecx
push 0xacb
push ebx
push dword [ebp + 0x10]
mov dword [ebp - 0x24], 0x6f393842
mov edx, edi
push 0x72a6
push esi
mov ecx, 0x37e6
call fcn.10020cc8
mov eax, dword [ebp - 0x14]
add esp, 0x24
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [ecx], eax
xor ecx, ecx
inc dword [ebp - 0x14]
inc ecx
cmp dword [ebp - 0x14], ecx
jle 0x10020b35
mov ebx, dword [ebp - 0x18]
dec dword [ebx]
cmp dword [ebx], esi
jge 0x10020b27
mov eax, dword [ebp + 0x20]
inc dword [eax]
cmp dword [eax], ecx
jle 0x10020b21
dec dword [edi]
cmp dword [edi], esi
jge 0x10020af2
jmp 0x10020ba6
mov eax, dword [ebp + 0x14]
push 0xb
pop ecx
mov word [eax], cx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x100278d8
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10059278
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x54
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
movzx eax, byte [ebp + 0x18]
test eax, eax
je 0x10027a51
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 0x2c], eax
lea eax, [ebp + 0x20]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x20], 0x38f6
mov dword [ebp - 0x24], str.ldt_ztbged_cnmwdh_gvcrwl_mqvgiwdfn_nglni_vafuyelx_dlafllog
cmp dword [ebp - 0x20], 0x3948
jle 0x1002798e
and dword [ebp - 0x18], 0
jmp 0x1002793c
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0x20a2
jge 0x1002797c
and dword [ebp - 0x1c], 0
jmp 0x10027952
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0x2c13
jge 0x1002797a
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x1c]
cdq
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], edx
push dword [ebp - 0x60]
push dword [ebp - 0x64]
mov ecx, 0x10073038
call fcn.10004272
jmp 0x1002794b
jmp 0x10027935
push 0
push 0x1768
push 0x1f61
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x30], eax
and dword [ebp - 4], 0
cmp dword [ebp - 0x20], 0x3767
jge 0x100279ae
mov edx, dword [ebp - 0x24]
mov ecx, 0x10073038
call fcn.100062fd
jmp 0x100279ca
or dword [ebp - 4], 0xffffffff
jmp 0x100279d4
mov eax, dword [ebp - 0x28]
movzx eax, byte [eax]
test eax, eax
je 0x10027a2b
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x14]
mov dword [eax], 0
jmp 0x10027a0c
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 0x14]
mov dword [ecx], eax
mov eax, dword [ebp - 0x14]
cmp dword [eax], 1
jge 0x10027a29
mov eax, dword [ebp - 0x14]
push dword [eax]
mov ecx, dword [ebp - 0x3c]
call fcn.10001426
mov dword [eax], 0x95761be3
jmp 0x10027a01
jmp 0x10027a4f
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
movzx eax, byte [eax]
test eax, eax
je 0x10027a4f
push 0
push 0x45
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
jmp 0x10027a97
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x5c], eax
push dword [ebp - 0x4c]
push dword [ebp - 0x50]
push 0
push dword [ebp - 0x54]
push dword [ebp - 0x58]
push 0x618f
push 0x125a
push dword [ebp - 0x5c]
push 0x5c45
call fcn.10027edd
add esp, 0x24
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10027c21
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
movzx eax, byte [ebp + 0xc]
test eax, eax
je 0x10027c53
lea eax, [ebp + 0x10]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax]
test eax, eax
je 0x10027c49
push 0
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x10027c51
push 0
call dword [sym.imp.KERNEL32.dll_LockResource]
jmp 0x10027c99
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0xc], eax
push 0x4d6c
push 0x27d1
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push 0
push dword [ebp - 0x14]
push 0x2272
push dword [ebp - 0x18]
call fcn.100344c4
add esp, 0x24
mov esp, ebp
pop ebp
ret
Function at 0x401150
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401169
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40117d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40119e
cmp esi, eax
jae 0x401177
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401190
cmp esi, eax
jae 0x401177
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x4024b0
Capabilities:
Copy file

Disassembly:
push 0xffffffffffffffff
push 0x426450
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
push edi
mov edi, dword [esp + 0x20]
add edi, 0xfffffff0
push edi
mov dword [esp + 0x1c], 0
call fcn.00401640
add eax, 0x10
mov dword [esp + 0x10], eax
push str.NTSC.dcf
mov byte [esp + 0x20], 1
call fcn.0040cf1e
add esp, 8
push eax
push str.NTSC.dcf
lea ecx, [esp + 0x14]
call fcn.004018e0
mov eax, dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0
push str.C:Program_FilesMatrox_Imagingdriversmeteor_IIdcfNTSC.dcf
push eax
call esi
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x10]
call fcn.004019b0
push str.NTSCYC.dcf
call fcn.0040cf1e
add esp, 4
push eax
push str.NTSCYC.dcf
lea ecx, [esp + 0x14]
call fcn.004018e0
mov edx, dword [esp + 0xc]
push 0
push str.C:Program_FilesMatrox_Imagingdriversmeteor_IIdcfNTSCYC.dcf
push edx
call esi
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x10]
call fcn.004019b0
push str.PALYC.dcf
call fcn.0040cf1e
add esp, 4
push eax
push str.PALYC.dcf
lea ecx, [esp + 0x14]
call fcn.004018e0
mov ecx, dword [esp + 0xc]
push 0
push str.C:Program_FilesMatrox_Imagingdriversmeteor_IIdcfPALYC.dcf
push ecx
call esi
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x10]
call fcn.004019b0
push str.PAL.dcf
call fcn.0040cf1e
add esp, 4
push eax
push str.PAL.dcf
lea ecx, [esp + 0x14]
call fcn.004018e0
mov ebp, dword [esp + 0xc]
push 0
push str.C:Program_FilesMatrox_Imagingdriversmeteor_IIdcfPAL.dcf
push ebp
call esi
lea eax, [ebp - 0x10]
mov byte [esp + 0x18], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4025e1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov dword [esp + 0x18], 0xffffffff
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402600
mov ecx, dword [edi]
mov edx, dword [ecx]
push edi
call dword [edx + 4]
mov ecx, dword [esp + 0x10]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 4
Function at 0x403494
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
je 0x4034e7
call fcn.00423b50
mov edi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
cmp eax, ebx
je 0x4034e7
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x4034dd
xor eax, eax
jmp 0x403600
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], ebx
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xc], 1
je 0x403517
mov eax, dword [esi]
push edi
push dword [ebp - 4]
mov ecx, esi
push ebx
call dword [eax + 0x1c]
cmp dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
je 0x403517
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x4035fd
mov ecx, dword [eax + 0x40]
and dword [ebp + 0xc], 0
test ecx, ecx
mov dword [ebp + 8], ecx
mov dword [ebp - 8], ecx
je 0x403544
lea ecx, [eax + 0x3c]
lea eax, [ebp + 8]
push eax
call fcn.00404ab4
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
xor eax, eax
cmp dword [edi + 8], eax
mov dword [ebp - 4], eax
jbe 0x4035fd
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x40358d
mov ecx, dword [ecx + 4]
mov edx, dword [edi + 0xc]
mov ecx, dword [ecx + 0x28]
cmp ecx, dword [edx + eax*8]
jne 0x40358d
mov eax, dword [ebp + 8]
test eax, eax
mov dword [ebp - 8], eax
je 0x403587
mov ecx, dword [ebx + 0x48]
lea eax, [ebp + 8]
add ecx, 0x3c
push eax
call fcn.00404ab4
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
jmp 0x4035ed
and dword [ebp + 0xc], 0
jmp 0x4035ed
mov ecx, dword [edi + 0xc]
shl eax, 3
cmp dword [eax + ecx], 0
mov dword [ebp - 0x10], eax
je 0x4035ed
push 0xc
call fcn.0041b35e
mov esi, eax
test esi, esi
pop ecx
je 0x4035cf
mov eax, dword [edi + 0xc]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebx + 0x1c]
add eax, edx
push dword [eax]
mov edi, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_GetDlgItem]
and dword [esi + 4], 0
mov dword [esi + 8], edi
mov edi, dword [ebp + 0x10]
mov dword [esi], eax
jmp 0x4035d1
xor esi, esi
mov ecx, dword [ebx + 0x48]
add ecx, 0x3c
cmp dword [ebp - 8], 0
push esi
je 0x4035e8
push dword [ebp - 8]
call fcn.004197ce
jmp 0x4035ed
call fcn.004197a5
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [edi + 8]
mov dword [ebp - 4], eax
jb 0x403552
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x40c75c
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x42b430
call fcn.0040df68
mov edi, 0x94
mov eax, edi
call fcn.0040d990
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 [0x4372dc], ecx
mov eax, dword [esi + 4]
mov dword [0x4372e8], eax
mov edx, dword [esi + 8]
mov dword [0x4372ec], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4372e0], esi
cmp ecx, 2
je 0x40c7bc
or esi, 0x8000
mov dword [0x4372e0], esi
shl eax, 8
add eax, edx
mov dword [0x4372e4], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40c7f7
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40c7f7
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40c80f
cmp eax, 0x20b
je 0x40c7fc
mov dword [ebp - 0x1c], esi
jmp 0x40c823
cmp dword [ecx + 0x84], 0xe
jbe 0x40c7f7
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40c81d
cmp dword [ecx + 0x74], 0xe
jbe 0x40c7f7
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040f9a1
pop ecx
test eax, eax
jne 0x40c837
push 0x1c
call fcn.0040c738
pop ecx
call fcn.0040f898
test eax, eax
jne 0x40c848
push 0x10
call fcn.0040c738
pop ecx
call fcn.0040f632
mov dword [ebp - 4], esi
call fcn.0040f434
test eax, eax
jge 0x40c861
push 0x1b
call fcn.0040c713
pop ecx
call fcn.0040f395
mov dword [0x438cb0], eax
call fcn.0040f22b
mov dword [0x4372d0], eax
call fcn.0040f195
test eax, eax
jge 0x40c886
push 8
call fcn.0040c713
pop ecx
call fcn.0040ef62
test eax, eax
jge 0x40c897
push 9
call fcn.0040c713
pop ecx
push 1
call fcn.0040d3dd
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40c8ad
push eax
call fcn.0040c713
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
call fcn.0040ef1c
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40c8ce
movzx eax, word [ebp - 0x40]
jmp 0x40c8d1
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00419378
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40c8ef
push edi
call fcn.0040d50a
call fcn.0040d52c
jmp 0x40c921
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040dfa3
ret
Function at 0x40d447
Capabilities:
Terminate process

Disassembly:
push 8
push 0x42b478
call fcn.0040df68
push 8
call fcn.00411ea2
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x43731c], esi
jne 0x40d47b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x437318], esi
mov al, byte [ebp + 0x10]
mov byte [0x437314], al
cmp dword [ebp + 0xc], edi
jne 0x40d4c5
cmp dword [0x438ca8], edi
je 0x40d4b5
mov eax, dword [0x438ca4]
sub eax, 4
mov dword [0x438ca4], eax
cmp eax, dword [0x438ca8]
jb 0x40d4b5
mov eax, dword [eax]
cmp eax, edi
je 0x40d496
call eax
jmp 0x40d496
push 0x43308c
mov eax, 0x433084
call fcn.0040d3c5
pop ecx
push 0x433098
mov eax, 0x433090
call fcn.0040d3c5
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40d4f6
cmp dword [ebp + 0x10], edi
jne 0x40d504
mov dword [0x43731c], esi
push dword [ebp + 8]
call fcn.0040d383
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40d503
push 8
call fcn.00411ded
pop ecx
ret
call fcn.0040dfa3
ret

Function at 0x40e57a
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.0040d990
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40e615
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 [0x4372dc]
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 0x40e615
cmp eax, 1
je 0x40e636
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 0x40e615
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40e5e2
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40e611
xor eax, eax
inc eax
jmp 0x40e655
cmp edi, eax
jae 0x40e619
xor eax, eax
jmp 0x40e655
cmp eax, esi
jae 0x40e620
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 [0x4372dc]
jmp 0x40e639
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 0x40ec08
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x434100]
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 + 0x4342b8]
je 0x40ec3d
inc eax
cmp eax, 0x13
jb 0x40ec2e
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4342b8]
jne 0x40ed63
mov eax, dword [0x4372d4]
cmp eax, 1
je 0x40ed3b
cmp eax, edx
jne 0x40ec6d
cmp dword [0x4340e0], 1
je 0x40ed3b
cmp ecx, 0xfc
je 0x40ed63
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 0x40eca3
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00414190
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0040ddb0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40ecd7
mov eax, edi
push eax
call fcn.0040ddb0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x42b908
push edi
call fcn.00414290
add esp, 0x10
push edi
call fcn.0040ddb0
push dword [esi + 0x4342bc]
mov ebx, eax
call fcn.0040ddb0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040d990
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00414190
push edi
push ebx
call fcn.004141a0
push 0x42b8e8
push ebx
call fcn.004141a0
push dword [esi + 0x4342bc]
push ebx
call fcn.004141a0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00414092
add esp, 0x2c
jmp 0x40ed63
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4342bc]
push dword [esi]
call fcn.0040ddb0
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.0040d31e
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40f22b
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x43753c]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push esi
push edi
xor ebx, ebx
xor esi, esi
xor edi, edi
cmp eax, ebx
jne 0x40f274
call ebp
mov esi, eax
cmp esi, ebx
je 0x40f25a
mov dword [0x43753c], 1
jmp 0x40f279
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x40f26f
push 2
pop eax
mov dword [0x43753c], eax
jmp 0x40f274
mov eax, dword [0x43753c]
cmp eax, 1
jne 0x40f2d1
cmp esi, ebx
jne 0x40f28c
call ebp
mov esi, eax
cmp esi, ebx
jne 0x40f28c
xor eax, eax
jmp 0x40f378
cmp word [esi], bx
mov eax, esi
je 0x40f2a1
inc eax
inc eax
cmp word [eax], bx
jne 0x40f293
inc eax
inc eax
cmp word [eax], bx
jne 0x40f293
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.0040db8f
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x40f2c4
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
jmp 0x40f378
push ebp
push esi
push edi
call fcn.0040d620
add esp, 0xc
jmp 0x40f2b6
cmp eax, 2
je 0x40f2da
cmp eax, ebx
jne 0x40f285
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x40f285
cmp byte [ebp], bl
mov esi, ebp
je 0x40f310
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x40f285
push esi
add edi, eax
call fcn.0040ddb0
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x40f2ed
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.0040db8f
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x40f389
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x40f36a
mov ecx, dword [esp + 0x14]
mov eax, esi
sub eax, dword [esp + 0x10]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x40f37f
push edi
call fcn.0040ddb0
push esi
lea edi, [edi + eax + 1]
call fcn.0040cf1e
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x40f330
push ebp
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
push dword [esp + 0x10]
call fcn.0040d5ac
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x40f285
Function at 0x40f395
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x437540]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x40f3d5
call esi
test eax, eax
je 0x40f3ba
mov dword [0x437540], 1
jmp 0x40f3da
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x40f3d1
mov dword [0x437540], 2
jmp 0x40f3e3
xor eax, eax
jmp 0x40f431
cmp eax, 1
jne 0x40f3de
call esi
jmp 0x40f431
cmp eax, 2
jne 0x40f3d1
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebp
push ebp
push 0xffffffffffffffff
mov ebx, eax
push ebx
push 1
push ebp
call edi
mov esi, eax
cmp esi, ebp
je 0x40f429
lea eax, [esi + esi]
push eax
call fcn.0040db8f
mov ebp, eax
test ebp, ebp
pop ecx
je 0x40f429
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
jne 0x40f42d
push ebp
call fcn.0040d5ac
pop ecx
xor eax, eax
jmp 0x40f42f
mov eax, ebp
pop edi
pop ebx
pop esi
pop ebp
ret