joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4bd1ec
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00405888
mov eax, dword [ebp - 8]
call fcn.00405888
xor eax, eax
push ebp
push 0x4bd3e5
push dword fs:[eax]
mov dword fs:[eax], esp
xor edx, edx
push ebp
push 0x4bd3ad
push dword fs:[edx]
mov dword fs:[edx], esp
push 0x40
mov ecx, dword [ebp - 4]
mov dl, 1
mov eax, dword [0x41a5b8]
call fcn.0041f314
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x4bd284
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
call fcn.0040aa30
test al, al
je 0x4bd27a
mov eax, dword [ebp - 8]
call fcn.00405898
mov edx, eax
lea eax, [ebp - 0x1c]
call fcn.00405600
mov eax, dword [ebp - 0x1c]
call fcn.00405898
push eax
call sub.kernel32.dll_DeleteFileA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4bd28e
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 8]
call fcn.00405898
push eax
call sub.kernel32.dll_CreateFileA_1
push eax
call sub.kernel32.dll_CloseHandle_1
push 1
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x41a5b8]
call fcn.0041f314
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x4bd39c
push dword fs:[eax]
mov dword fs:[eax], esp
mov cx, 2
mov edx, 0xfffffffc
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0x14]
lea edx, [ebp - 0x14]
mov ecx, 4
mov eax, dword [ebp - 0xc]
call fcn.0041f08c
mov edx, dword [ebp - 0x14]
add edx, 8
neg edx
mov cx, 2
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0x14]
lea edx, [ebp - 0x18]
mov ecx, 4
mov eax, dword [ebp - 0xc]
call fcn.0041f08c
mov edx, dword [ebp - 0x14]
add edx, 8
add edx, dword [ebp - 0x18]
neg edx
mov cx, 2
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0x14]
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 0x10]
mov ebx, dword [eax]
call dword [ebx + 0x14]
mov eax, dword [ebp - 0x18]
cdq
push edx
push eax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
call fcn.0041f0fc
mov edx, dword [ebp - 0x14]
add edx, 8
add edx, dword [ebp - 0x18]
add edx, 0xc350
neg edx
mov cx, 2
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0x14]
push 0
push 0xc350
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
call fcn.0041f0fc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4bd3a3
mov eax, dword [ebp - 0x10]
call fcn.00404508
mov eax, dword [ebp - 0xc]
call fcn.00404508
ret
Function at 0x4bf164
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdec
push ebx
xor ecx, ecx
mov dword [ebp - 8], ecx
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00405888
xor eax, eax
push ebp
push 0x4bf1f9
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 8]
mov ecx, 0x4bf210
mov edx, dword [ebp - 4]
call fcn.00405720
push 0xff
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 0xff
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebp - 8]
call fcn.00405898
push eax
call sub.kernel32.dll_GetVolumeInformationA
mov eax, dword [ebp - 0xc]
xor edx, edx
push edx
push eax
mov eax, ebx
call fcn.0040a428
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4bf200
lea eax, [ebp - 8]
mov edx, 2
call fcn.0040542c
ret

Function at 0x4bf2e0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
xor ecx, ecx
mov dword [ebp - 8], ecx
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00405888
xor eax, eax
push ebp
push 0x4bf3ba
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 8]
mov ecx, 0x4bf3d0
mov edx, dword [ebp - 4]
call fcn.00405720
mov eax, dword [ebp - 8]
call fcn.00405898
push eax
call sub.kernel32.dll_GetDriveTypeA
cmp eax, 6
ja case.0x4bf32a.0
jmp dword [eax*4 + 0x4bf331]
mov eax, ebx
mov edx, 0x4bf3dc
call fcn.0040545c
jmp 0x4bf39f
mov eax, ebx
mov edx, 0x4bf3ec
call fcn.0040545c
jmp 0x4bf39f
mov eax, ebx
mov edx, 0x4bf3fc
call fcn.0040545c
jmp 0x4bf39f
mov eax, ebx
mov edx, 0x4bf40c
call fcn.0040545c
jmp 0x4bf39f
mov eax, ebx
mov edx, 0x4bf41c
call fcn.0040545c
jmp 0x4bf39f
mov eax, ebx
mov edx, 0x4bf42c
call fcn.0040545c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4bf3c1
lea eax, [ebp - 8]
mov edx, 2
call fcn.0040542c
ret
Function at 0x4c1d84
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe28
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x1d4], edx
mov dword [ebp - 0x1d8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00405888
xor eax, eax
push ebp
push 0x4c1ec5
push dword fs:[eax]
mov dword fs:[eax], esp
xor edx, edx
push ebp
push 0x4c1e95
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
call fcn.00405898
mov ebx, eax
push ebx
call sub.kernel32.dll_DeleteFileA
push ebx
call sub.kernel32.dll_DeleteFileA
mov eax, dword [ebp - 4]
call fcn.0040aa30
test al, al
jne 0x4c1e05
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push ebx
call sub.kernel32.dll_CreateFileA_1
push eax
call sub.kernel32.dll_CloseHandle_1
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x1d0]
call fcn.00403858
lea eax, [ebp - 0x1d0]
call fcn.004035f4
call fcn.004030d4
push dword [0x4d0e90]
push 0x4c1edc
push dword [0x4d0e94]
push 0x4c1edc
push dword [0x4d0e98]
lea eax, [ebp - 0x1d8]
mov edx, 5
call fcn.0040579c
mov eax, dword [ebp - 0x1d8]
lea edx, [ebp - 0x1d4]
call fcn.004bc64c
mov edx, dword [ebp - 0x1d4]
lea eax, [ebp - 0x1d0]
call fcn.00405bb8
call fcn.00403f50
call fcn.004030d4
lea eax, [ebp - 0x1d0]
call fcn.00403920
call fcn.004030d4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4c1e9f
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c1ecc
lea eax, [ebp - 0x1d8]
mov edx, 2
call fcn.0040542c
lea eax, [ebp - 4]
call fcn.00405408
ret
Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x40c7d0
nop
mov ecx, 0x2aca3aeb
nop
test eax, eax
nop
nop
nop
nop
je 0x43204e
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x432024
nop
nop
nop
mov eax, section..data
mov ebx, 0x42f314
nop
mov ecx, 0x42983666
nop
nop
nop
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x432084
nop
xor dword [eax], ecx
nop
nop
nop
nop
add eax, 4
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
jne 0x43206c
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x401685
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x620
push dword [ebp + 8]
lea ecx, [ebp - 0x108]
push ecx
call fcn.00409f00
add esp, 8
lea ecx, [ebp - 0x108]
push ecx
call fcn.00409ff0
add esp, 4
test eax, eax
je 0x4016dc
lea eax, [ebp - 0x108]
push eax
call fcn.00409ff0
add esp, 4
lea eax, [ebp + eax - 0x109]
movsx cx, byte [eax]
cmp cx, 0x5c
je 0x4016d9
cmp cx, 0x2f
jne 0x4016dc
mov byte [eax], 0
lea eax, [ebp - 0x51c]
lea ecx, [ebp - 0x620]
push eax
lea edx, [ebp - 0x314]
push ecx
lea eax, [ebp - 0x418]
push edx
lea ecx, [ebp - 0x108]
push eax
push ecx
call fcn.004027d0
add esp, 0x14
lea ecx, [ebp - 0x314]
push ecx
call fcn.00409ff0
add esp, 4
test eax, eax
je 0x401797
lea eax, [ebp - 0x418]
lea ecx, [ebp - 0x210]
push eax
push ecx
call fcn.00409f00
add esp, 8
lea ecx, [ebp - 0x314]
lea edx, [ebp - 0x210]
push ecx
push edx
call fcn.00409f10
add esp, 8
lea ecx, [ebp - 0x210]
push ecx
call fcn.00401685
add esp, 4
test eax, eax
je 0x401760
mov eax, 0xffffffff
jmp 0x401799
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40178c
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x401797
mov eax, 0xffffffff
jmp 0x401799
test al, 0x10
jne 0x401797
mov eax, 0xffffffff
jmp 0x401799
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x40179d
Capabilities:
Check if file exists

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
sub esp, 8
push esi
push edi
mov esi, dword [ebp + 0x10]
push eax
push pe_nt_image_headers32
push 3
push eax
mov dword [esi], eax
push eax
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov edi, eax
jne 0x4017e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x401821
cmp eax, 3
je 0x401821
xor eax, eax
mov dword [esi], 0x20000005
jmp 0x401826
lea eax, [ebp - 8]
push eax
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x40181a
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jg 0x40181a
push edi
mov dword [esi], 0x20000004
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x401826
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40182c
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
inc eax
cmp eax, 1
sbb eax, eax
inc eax
ret
Function at 0x40183e
Capabilities:
Create process on windows
Get common file path

Disassembly:
push ebp
mov eax, dword [esp + 8]
mov ebp, esp
mov dword [0x41068c], eax
sub esp, 0x104
push ebx
push esi
push edi
xor ebx, ebx
push 0x4108d0
mov esi, 0x104
push esi
mov dword [0x410e18], ebx
mov dword [0x41103c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov byte [0x411040], bl
mov dword [0x4109d8], ebx
mov dword [0x410798], ebx
mov dword [0x4107bc], ebx
push esi
mov dword [0x41057c], ebx
push 0x411150
mov eax, dword [0x41068c]
push eax
mov dword [0x410688], ebx
mov byte [0x410c00], bl
mov dword [0x410f28], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call fcn.004019df
test eax, eax
je 0x4018ce
push 0x410f30
call fcn.00401c67
add esp, 4
test eax, eax
jne 0x4018db
push 0x20000001
call fcn.00402770
add esp, 4
push dword [ebp + 0x10]
call fcn.00401c67
add esp, 4
test eax, eax
jne 0x4018f7
push 0x20000001
call fcn.00402770
add esp, 4
cmp dword [0x410e18], 0
jne 0x401916
call fcn.00401fc0
test eax, eax
jne 0x401916
push 0x20000000
call fcn.00402770
add esp, 4
xor ebx, ebx
call fcn.004021fe
mov dword [0x4107b8], ebx
test eax, eax
jne 0x4019cb
cmp byte [0x410c00], bl
je 0x4019a1
mov edi, 1
cmp dword [0x4107bc], ebx
jne 0x401961
push ebx
push 0x410c00
push 0x3ed
push 0x5de
push 0x24
call fcn.00402575
add esp, 0x14
cmp eax, 6
je 0x401961
xor edi, edi
xor esi, esi
test edi, edi
je 0x4019a1
mov edi, 0x410c00
lea eax, [ebp - 0x104]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x411040
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x104]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 5
push esi
push esi
push edi
push esi
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
xor eax, eax
cmp dword [0x4107bc], eax
jne 0x4019d4
cmp dword [0x410f28], eax
je 0x4019d4
push eax
push eax
push 0x3ea
push 0x5de
push 0x40
call fcn.00402575
add esp, 0x14
jmp 0x4019d4
push eax
call fcn.00402770
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x402512
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
lea eax, [ebp - 4]
mov esi, dword [ebp + 8]
push eax
push 0x20019
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
mov byte [esi], 0
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40256e
lea eax, [ebp - 0xc]
lea ecx, [ebp - 8]
mov dword [ebp - 8], 1
mov dword [ebp - 0xc], 0x104
push eax
push esi
push ecx
push 0
push str.ProgramFilesDir
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40446c
Capabilities:
Encode data using xor

Disassembly:
push ebx
push ecx
push edx
push esi
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov edx, ecx
cmp edx, 4
jl 0x4044b3
cmp edx, 0x10
jl 0x40449f
shr ecx, 4
nop
xor eax, dword [ebx]
mov esi, dword [ebx + 4]
xor eax, dword [ebx + 8]
xor esi, dword [ebx + 0xc]
add ebx, 0x10
xor eax, esi
dec ecx
jne 0x40448c
mov ecx, edx
shr ecx, 2
and ecx, 3
test ecx, ecx
je 0x4044b3
xor eax, dword [ebx]
add ebx, 4
dec ecx
jne 0x4044ab
and edx, 3
cmp edx, 3
jne 0x4044c7
xor ecx, ecx
mov cl, byte [ebx]
inc ebx
shl ecx, 0x10
xor eax, ecx
jmp 0x4044cc
cmp edx, 2
jne 0x4044d8
xor ecx, ecx
mov cl, byte [ebx]
inc ebx
shl ecx, 8
xor eax, ecx
jmp 0x4044dd
cmp edx, 1
jne 0x4044e3
xor ecx, ecx
mov cl, byte [ebx]
xor eax, ecx
pop esi
pop edx
pop ecx
pop ebx
ret
Function at 0x4091c0
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40d130
push 0x40b3c4
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x40e584], eax
xor eax, eax
mov al, byte [0x40e585]
mov dword [0x40e590], eax
mov eax, dword [0x40e584]
shr dword [0x40e584], 0x10
and eax, 0xff
mov dword [0x40e58c], eax
shl eax, 8
add eax, dword [0x40e590]
mov dword [0x40e588], eax
call fcn.0040b380
test eax, eax
jne 0x409234
push 0x1c
call fcn.00409360
add esp, 4
mov dword [ebp - 4], 0
call fcn.0040b1a0
call fcn.0040b190
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x412b80], eax
call fcn.0040ad40
mov dword [0x40e348], eax
test eax, eax
je 0x409267
cmp dword [0x412b80], 0
jne 0x409271
push 0xffffffffffffffff
call fcn.0040a2b0
add esp, 4
call fcn.0040aac0
call fcn.0040a9d0
call fcn.0040a280
mov esi, dword [0x412b80]
mov al, byte [esi]
cmp al, 0x22
je 0x409298
cmp al, 0x20
jbe 0x4092c5
inc esi
cmp byte [esi], 0x20
ja 0x409290
jmp 0x4092c5
inc esi
cmp byte [esi], 0x22
je 0x4092c4
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x4092bf
xor eax, eax
mov al, bl
push eax
call fcn.0040a970
add esp, 4
test eax, eax
je 0x4092b9
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x4092a1
cmp byte [esi], 0x22
jne 0x4092c5
inc esi
cmp byte [esi], 0
je 0x4092d5
cmp byte [esi], 0x20
ja 0x4092d5
inc esi
cmp byte [esi], 0
jne 0x4092ca
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x44], 1
mov eax, 0xa
je 0x4092f9
mov eax, dword [ebp - 0x40]
and eax, 0xffff
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
push eax
call fcn.0040a2b0
jmp 0x40933a
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
pop edi
mov dword fs:[0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x409b40
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x418
cmp dword [0x412b70], edx
push ebx
push esi
push edi
push ebp
jbe 0x409d47
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x412a70
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ecx, dword [esp + 0x18]
shl eax, 3
mov ebx, dword [ecx]
mov ebp, eax
mov dword [esp + 0x1c], eax
mov al, byte [ebx + ebp + 4]
test al, 1
je 0x409d47
xor esi, esi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], esi
cmp ebp, esi
jne 0x409ba9
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
test al, 0x20
je 0x409bba
push 2
push 0
push edx
call fcn.00409e40
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x409c56
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x409c8f
lea edi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x409c1d
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x409c0b
mov byte [edi], 0xd
inc esi
inc edi
mov byte [edi], al
inc edi
mov eax, edi
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x409bf2
lea eax, [esp + 0x24]
push 0
sub edi, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push edi
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409c85
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, edi
jge 0x409bdd
jmp 0x409c8f
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409c85
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x409c8f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x409d36
cmp dword [esp + 0x10], 0
je 0x409ce8
cmp dword [esp + 0x10], 5
jne 0x409ccb
mov dword [0x40e578], 9
mov eax, dword [esp + 0x10]
pop ebp
pop edi
mov dword [0x40e57c], eax
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
push eax
call fcn.0040c230
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x409d12
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x409d12
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x40e578], 0x1c
mov dword [0x40e57c], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, esi
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x40e578], 9
mov dword [0x40e57c], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x40a2f0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x40e5c0], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x40a30e
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x40e5bc], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x40e5b8], bl
jne 0x40a368
cmp dword [0x412b78], 0
je 0x40a356
mov edi, dword [0x412b74]
sub edi, 4
cmp edi, dword [0x412b78]
jb 0x40a356
mov eax, dword [edi]
test eax, eax
je 0x40a34b
call eax
sub edi, 4
cmp edi, dword [0x412b78]
jae 0x40a343
push 0x40e014
push 0x40e010
call fcn.0040a3a0
add esp, 8
push 0x40e01c
push 0x40e018
call fcn.0040a3a0
add esp, 8
test ebx, ebx
jne 0x40a38f
mov dword [0x40e5c0], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret
Function at 0x40ad40
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
push ebx
push esi
push edi
xor ebx, ebx
push ebp
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x40e670], ebx
jne 0x40ad8f
call esi
cmp eax, ebx
mov edi, eax
je 0x40ad6d
mov dword [0x40e670], 1
jmp 0x40ad8f
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x40ad85
mov dword [0x40e670], 2
jmp 0x40ad8f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x40e670], 1
jne 0x40ae3e
test edi, edi
jne 0x40adb2
call esi
mov edi, eax
test edi, edi
jne 0x40adb2
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x40adcc
add esi, 2
cmp word [esi], 0
jne 0x40adba
add esi, 2
cmp word [esi], 0
jne 0x40adba
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x40ae2d
push ebp
call fcn.00409390
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x40ae2d
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x40ae1c
push ebx
call fcn.00409440
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x40e670], 2
jne 0x40aec2
test ebx, ebx
jne 0x40ae61
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x40ae61
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x40ae76
inc ebp
cmp byte [ebp], 0
jne 0x40ae68
inc ebp
cmp byte [ebp], 0
jne 0x40ae68
sub ebp, ebx
inc ebp
push ebp
call fcn.00409390
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x40ae9b
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x40b4e0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x40e8a0
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x40b507
add eax, 8
inc ecx
cmp eax, 0x40e930
jb 0x40b4f8
cmp dword [ecx*8 + 0x40e8a0], edx
lea ebx, [ecx*8]
jne 0x40b6cb
cmp dword [0x40e354], 1
je 0x40b687
cmp dword [0x40e354], 0
jne 0x40b53e
cmp dword [0x40e358], 1
je 0x40b687
cmp edx, 0xfc
je 0x40b6cb
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x40b57b
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x40b5bf
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x40d410
push ebp
call fcn.0040a520
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40d3f0
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x40e8a4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.0040c460
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x412a70], 0
je 0x40b69d
mov eax, dword [0x412a70]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x40b6a7
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x40e8a4]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret