joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a9c0
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x43a3db
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x338
mov eax, dword [0x449260]
push ebx
push ebp
push esi
mov ebp, ecx
push edi
lea ecx, [esp + 0x10]
mov dword [esp + 0x344], eax
call fcn.00409c00
mov esi, dword [esp + 0x358]
push esi
lea ecx, [esp + 0x14]
mov dword [esp + 0x354], 0
call fcn.00409c80
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call edi
test al, 1
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
je 0x40aa2c
and eax, 0xfffffffe
push eax
push esi
call ebx
lea eax, [esp + 0x13c]
push esi
push eax
call fcn.00417d96
add esp, 8
push 0x43c56c
lea ecx, [esp + 0x140]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRenameExtensionW]
lea edx, [esp + 0x13c]
push edx
call edi
test al, 1
je 0x40aa6c
and eax, 0xfffffffe
push eax
lea eax, [esp + 0x140]
push eax
call ebx
add ebp, 4
push ebp
lea ecx, [esp + 0x14]
call fcn.00409fd0
push esi
lea ecx, [esp + 0x14]
mov edi, eax
call fcn.00407c70
test al, al
lea ecx, [esp + 0x10]
mov dword [esp + 0x350], 0xffffffff
je 0x40aaa1
call fcn.004098e0
mov eax, edi
jmp 0x40aaa9
call fcn.004098e0
or eax, 0xffffffff
mov ecx, dword [esp + 0x348]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x338]
pop ebx
call fcn.00417c0f
add esp, 0x344
ret 4
Function at 0x40ac50
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 8
push ebx
push esi
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push eax
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40ab2c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
xor al, al
pop ebx
add esp, 8
ret 4
push ebp
push edi
push 0
push esi
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
push ebp
call fcn.0042cc63
add esp, 4
push 0
lea ecx, [esp + 0x18]
push ecx
push ebp
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 0x14]
push edx
push edi
mov ecx, ebx
call fcn.0040a780
test edi, edi
mov byte [esp + 0x13], al
je 0x40ab7a
push edi
call fcn.0042cc68
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x13]
test al, al
je 0x40ac1b
mov eax, dword [esp + 0x1c]
push 0
push 0x43bb94
push 0
push 0
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
jle 0x40ac17
lea edi, [ebp + 1]
push edi
call fcn.0042cc63
add esp, 4
mov esi, eax
mov ecx, edi
mov edx, ecx
push 0
shr ecx, 2
xor eax, eax
push 0x43bb94
mov edi, esi
rep stosd dword es:[edi], eax
push ebp
mov ecx, edx
push esi
and ecx, 3
push 0xffffffffffffffff
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x30]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [ebx + 4]
mov eax, esi
sub ecx, esi
mov dl, byte [eax]
mov byte [ecx + eax], dl
inc eax
test dl, dl
jne 0x40abf2
test esi, esi
je 0x40ac1b
push esi
call fcn.0042cc68
mov al, byte [esp + 0x17]
add esp, 4
pop edi
pop ebp
pop esi
pop ebx
add esp, 8
ret 4
mov byte [ebx + 4], 0
mov al, byte [esp + 0x13]
pop edi
pop ebp
pop esi
pop ebx
add esp, 8
ret 4
add ecx, 4
jmp 0x40aaf0
Function at 0x40e2c9
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 0x40e31c
call fcn.004375f6
mov edi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
cmp eax, ebx
je 0x40e31c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x40e312
xor eax, eax
jmp 0x40e435
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 0x40e34c
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 0x40e34c
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x40e432
mov ecx, dword [eax + 0x40]
and dword [ebp + 0xc], 0
test ecx, ecx
mov dword [ebp + 8], ecx
mov dword [ebp - 8], ecx
je 0x40e379
lea ecx, [eax + 0x3c]
lea eax, [ebp + 8]
push eax
call fcn.0040ea20
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
xor eax, eax
cmp dword [edi + 8], eax
mov dword [ebp - 4], eax
jbe 0x40e432
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x40e3c2
mov ecx, dword [ecx + 4]
mov edx, dword [edi + 0xc]
mov ecx, dword [ecx + 0x28]
cmp ecx, dword [edx + eax*8]
jne 0x40e3c2
mov eax, dword [ebp + 8]
test eax, eax
mov dword [ebp - 8], eax
je 0x40e3bc
mov ecx, dword [ebx + 0x48]
lea eax, [ebp + 8]
add ecx, 0x3c
push eax
call fcn.0040ea20
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
jmp 0x40e422
and dword [ebp + 0xc], 0
jmp 0x40e422
mov ecx, dword [edi + 0xc]
shl eax, 3
cmp dword [eax + ecx], 0
mov dword [ebp - 0x10], eax
je 0x40e422
push 0xc
call fcn.0042cc38
mov esi, eax
test esi, esi
pop ecx
je 0x40e404
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 0x40e406
xor esi, esi
mov ecx, dword [ebx + 0x48]
add ecx, 0x3c
cmp dword [ebp - 8], 0
push esi
je 0x40e41d
push dword [ebp - 8]
call fcn.0042c70b
jmp 0x40e422
call fcn.0042c6e2
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [edi + 8]
mov dword [ebp - 4], eax
jb 0x40e387
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x416d32
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x43fde0
call fcn.0041b008
mov edi, 0x94
mov eax, edi
call fcn.00418b40
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 [0x4b9d10], ecx
mov eax, dword [esi + 4]
mov dword [0x4b9d1c], eax
mov edx, dword [esi + 8]
mov dword [0x4b9d20], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4b9d14], esi
cmp ecx, 2
je 0x416d92
or esi, 0x8000
mov dword [0x4b9d14], esi
shl eax, 8
add eax, edx
mov dword [0x4b9d18], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x416dcd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x416dcd
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x416de5
cmp eax, 0x20b
je 0x416dd2
mov dword [ebp - 0x1c], esi
jmp 0x416df9
cmp dword [ecx + 0x84], 0xe
jbe 0x416dcd
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x416df3
cmp dword [ecx + 0x74], 0xe
jbe 0x416dcd
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0041c391
pop ecx
test eax, eax
jne 0x416e0d
push 0x1c
call fcn.00416d0e
pop ecx
call fcn.0041c288
test eax, eax
jne 0x416e1e
push 0x10
call fcn.00416d0e
pop ecx
call fcn.0041c022
mov dword [ebp - 4], esi
call fcn.0041be24
test eax, eax
jge 0x416e37
push 0x1b
call fcn.00416ce9
pop ecx
call fcn.0041bd85
mov dword [0x4bc850], eax
call fcn.0041bc1b
mov dword [0x4b9cfc], eax
call fcn.0041bb85
test eax, eax
jge 0x416e5c
push 8
call fcn.00416ce9
pop ecx
call fcn.0041b952
test eax, eax
jge 0x416e6d
push 9
call fcn.00416ce9
pop ecx
push 1
call fcn.0041916d
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x416e83
push eax
call fcn.00416ce9
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
call fcn.0041b90c
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x416ea4
movzx eax, word [ebp - 0x40]
jmp 0x416ea7
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0042c1e8
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x416ec5
push edi
call fcn.0041929a
call fcn.004192bc
jmp 0x416ef7
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0041b043
ret
Function at 0x41833c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x418510
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4bc740]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x418510
test cl, 0x48
je 0x4183a7
cmp byte [eax + 5], 0xa
je 0x4183a7
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4183f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x4183e1
call fcn.0041a01b
mov dword [eax], 9
call fcn.0041a024
mov dword [eax], esi
jmp 0x4183f1
cmp eax, 0x6d
je 0x418510
push eax
call fcn.0041a02d
pop ecx
or eax, 0xffffffff
jmp 0x418512
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x41850b
test eax, eax
je 0x418420
cmp byte [ebx], 0xa
jne 0x418420
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x418429
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x418505
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x4184f5
cmp al, 0xd
je 0x41845b
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x4184e7
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x418475
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x418470
add dword [ebp + 0x10], 2
jmp 0x4184c9
mov dword [ebp + 0x10], eax
jmp 0x4184e3
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41849d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4184e3
cmp dword [ebp - 0xc], 0
je 0x4184e3
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4184be
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x4184c9
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4184e6
cmp ebx, dword [ebp + 0xc]
jne 0x4184ce
cmp byte [ebp - 1], 0xa
jne 0x4184ce
mov byte [ebx], 0xa
jmp 0x4184e6
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00418959
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4184e7
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x41843f
jmp 0x418505
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x418505
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x418512
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4185c2
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x449260]
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 0x4185f3
xor eax, eax
jmp 0x41877c
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 + 0x4bc740]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x41862f
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0041eb3d
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x41870a
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x418748
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 0x418693
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x418684
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 0x418664
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 0x4186d3
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x4186dc
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x418655
jmp 0x4186de
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x418777
cmp dword [ebp - 0x6c], edi
je 0x418748
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x41873d
call fcn.0041a01b
mov dword [eax], 9
call fcn.0041a024
mov dword [eax], esi
jmp 0x418772
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 0x418732
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x4186de
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x4186de
push dword [ebp - 0x6c]
call fcn.0041a02d
pop ecx
jmp 0x418772
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x418760
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x418760
xor eax, eax
jmp 0x41877a
call fcn.0041a01b
mov dword [eax], 0x1c
call fcn.0041a024
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x41877a
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00417c0f
add ebp, 0x3a0
leave
ret
Function at 0x4191d7
Capabilities:
Terminate process

Disassembly:
push 8
push 0x43ff30
call fcn.0041b008
push 8
call fcn.0041de8d
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x4b9d50], esi
jne 0x41920b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x4b9d4c], esi
mov al, byte [ebp + 0x10]
mov byte [0x4b9d48], al
cmp dword [ebp + 0xc], edi
jne 0x419255
cmp dword [0x4bc848], edi
je 0x419245
mov eax, dword [0x4bc844]
sub eax, 4
mov dword [0x4bc844], eax
cmp eax, dword [0x4bc848]
jb 0x419245
mov eax, dword [eax]
cmp eax, edi
je 0x419226
call eax
jmp 0x419226
push 0x44809c
mov eax, 0x448094
call fcn.00419155
pop ecx
push 0x4480a8
mov eax, 0x4480a0
call fcn.00419155
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x419286
cmp dword [ebp + 0x10], edi
jne 0x419294
mov dword [0x4b9d50], esi
push dword [ebp + 8]
call fcn.00419113
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x419293
push 8
call fcn.0041ddd8
pop ecx
ret
call fcn.0041b043
ret

Function at 0x41b2ca
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.00418b40
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41b365
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 [0x4b9d10]
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 0x41b365
cmp eax, 1
je 0x41b386
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 0x41b365
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x41b332
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x41b361
xor eax, eax
inc eax
jmp 0x41b3a5
cmp edi, eax
jae 0x41b369
xor eax, eax
jmp 0x41b3a5
cmp eax, esi
jae 0x41b370
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 [0x4b9d10]
jmp 0x41b389
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 0x41b5f8
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x449260]
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 + 0x449410]
je 0x41b62d
inc eax
cmp eax, 0x13
jb 0x41b61e
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x449410]
jne 0x41b753
mov eax, dword [0x4b9d00]
cmp eax, 1
je 0x41b72b
cmp eax, edx
jne 0x41b65d
cmp dword [0x449230], 1
je 0x41b72b
cmp ecx, 0xfc
je 0x41b753
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 0x41b693
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0041f450
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00419920
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x41b6c7
mov eax, edi
push eax
call fcn.00419920
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x440448
push edi
call fcn.004179e0
add esp, 0x10
push edi
call fcn.00419920
push dword [esi + 0x449414]
mov ebx, eax
call fcn.00419920
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00418b40
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0041f450
push edi
push ebx
call fcn.0041f460
push 0x440428
push ebx
call fcn.0041f460
push dword [esi + 0x449414]
push ebx
call fcn.0041f460
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00421eb3
add esp, 0x2c
jmp 0x41b753
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x449414]
push dword [esi]
call fcn.00419920
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.00417c0f
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x41bc1b
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x4b9f6c]
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 0x41bc64
call ebp
mov esi, eax
cmp esi, ebx
je 0x41bc4a
mov dword [0x4b9f6c], 1
jmp 0x41bc69
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x41bc5f
push 2
pop eax
mov dword [0x4b9f6c], eax
jmp 0x41bc64
mov eax, dword [0x4b9f6c]
cmp eax, 1
jne 0x41bcc1
cmp esi, ebx
jne 0x41bc7c
call ebp
mov esi, eax
cmp esi, ebx
jne 0x41bc7c
xor eax, eax
jmp 0x41bd68
cmp word [esi], bx
mov eax, esi
je 0x41bc91
inc eax
inc eax
cmp word [eax], bx
jne 0x41bc83
inc eax
inc eax
cmp word [eax], bx
jne 0x41bc83
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.00417f7d
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x41bcb4
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
jmp 0x41bd68
push ebp
push esi
push edi
call fcn.004192e0
add esp, 0xc
jmp 0x41bca6
cmp eax, 2
je 0x41bcca
cmp eax, ebx
jne 0x41bc75
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x41bc75
cmp byte [ebp], bl
mov esi, ebp
je 0x41bd00
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x41bc75
push esi
add edi, eax
call fcn.00419920
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x41bcdd
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.00417f7d
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x41bd79
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x41bd5a
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 0x41bd6f
push edi
call fcn.00419920
push esi
lea edi, [edi + eax + 1]
call fcn.00416f06
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x41bd20
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.00417f8f
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x41bc75
Function at 0x41bd85
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x4b9f70]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x41bdc5
call esi
test eax, eax
je 0x41bdaa
mov dword [0x4b9f70], 1
jmp 0x41bdca
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x41bdc1
mov dword [0x4b9f70], 2
jmp 0x41bdd3
xor eax, eax
jmp 0x41be21
cmp eax, 1
jne 0x41bdce
call esi
jmp 0x41be21
cmp eax, 2
jne 0x41bdc1
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 0x41be19
lea eax, [esi + esi]
push eax
call fcn.00417f7d
mov ebp, eax
test ebp, ebp
pop ecx
je 0x41be19
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
jne 0x41be1d
push ebp
call fcn.00417f8f
pop ecx
xor eax, eax
jmp 0x41be1f
mov eax, ebp
pop edi
pop ebx
pop esi
pop ebp
ret

Function at 0x41e9fc
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.00418b40
mov eax, dword [0x449260]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.00418959
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0x1008], eax
je 0x41eb2f
push 2
push esi
push dword [ebp + 8]
call fcn.00418959
add esp, 0xc
cmp eax, ebx
je 0x41eb2f
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x41eacf
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00419650
push 0x8000
push dword [ebp + 8]
call fcn.00422cb5
add esp, 0x14
mov dword [ebp - 0x100c], eax
cmp edi, ebx
mov eax, ebx
jge 0x41ea85
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push dword [ebp + 8]
call fcn.004185c2
add esp, 0xc
cmp eax, 0xffffffff
je 0x41eaa5
sub edi, eax
test edi, edi
jg 0x41ea7d
jmp 0x41eabd
call fcn.0041a024
cmp dword [eax], 5
jne 0x41eaba
call fcn.0041a01b
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0x100c]
push dword [ebp + 8]
call fcn.00422cb5
pop ecx
pop ecx
jmp 0x41eb17
jge 0x41eb17
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00418959
push dword [ebp + 8]
call fcn.00419cd5
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x41eb17
call fcn.0041a01b
mov dword [eax], 0xd
call fcn.0041a024
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0x1008]
push dword [ebp + 8]
call fcn.00418959
add esp, 0xc
mov eax, esi
pop edi
jmp 0x41eb31
mov eax, ebx
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.00417c0f
leave
ret