joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401325
Capabilities:
Get system information on windows
Terminate process

Disassembly:
jmp 0x443610
sub esp, 0x1bc
mov eax, dword [0x488180]
xor eax, esp
mov dword [esp + 0x1b8], eax
push 0x94
lea eax, [esp + 0x28]
push 0
push eax
call fcn.0044c680
xor eax, eax
push str.Microsoft
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
call fcn.00401415
push eax
push 0x4a8390
call fcn.00401a28
add esp, 0x18
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x28], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x4436a8
push 0x10
push str.tcsh
push str.GetVersionEx_failed_in_getmachine
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push esi
lea edx, [esp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0x38]
cmp eax, 2
jne 0x44371b
cmp byte [esp + 0x3c], 0
mov esi, str.WindowsNT
lea eax, [esp + 0x3c]
jne 0x4436d2
mov eax, 0x47cce9
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
push eax
mov eax, dword [esp + 0x38]
push eax
push ecx
push edx
push str.Windows_NT
push str._s__d._d_Build__d___s_
lea eax, [esp + 0xd4]
push 0x100
push eax
call fcn.0046fe5d
lea ecx, [esp + 0xdc]
push ecx
call fcn.00401415
push eax
push 0x4a837c
call fcn.00401a28
add esp, 0x2c
jmp 0x443782
cmp eax, 1
jne 0x443769
movzx edx, word [esp + 0x34]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
push edx
push eax
push ecx
push str.Win9x__d._d:_d
lea edx, [esp + 0xcc]
push 0x100
push edx
mov esi, str.Windows9x
call fcn.0046fe5d
lea eax, [esp + 0xd4]
push eax
call fcn.00401415
push eax
push 0x4a837c
call fcn.00401a28
add esp, 0x24
jmp 0x443782
push 0x10
push str.tcsh
push str.Unknown_platform
push 0
mov esi, str.WindowsWhoKnows
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call fcn.00401415
push eax
push 0x4a83b4
call fcn.00401a28
movzx eax, word [esp + 0x10]
add esp, 0xc
cmp eax, 9
pop esi
ja case.0x4437a5.4
jmp dword [eax*4 + 0x443874]
mov ax, word [esp + 0x20]
cmp ax, 3
jb 0x4437bd
cmp ax, 9
jbe 0x4437c6
mov ax, 3
mov word [esp + 0x20], ax
movzx ecx, ax
push ecx
push str.i_d86
lea edx, [esp + 0xc0]
push 0x100
push edx
call fcn.0046fe5d
add esp, 0x10
jmp 0x443843
push str.Alpha
push 0x100
lea eax, [esp + 0xc0]
push eax
jmp 0x44383b
push str.Mips
jmp 0x44382e
push 0x4834c0
push 0x100
lea edx, [esp + 0xc0]
push edx
jmp 0x44383b
push str.AMD64
push 0x100
lea eax, [esp + 0xc0]
push eax
jmp 0x44383b
push str.Unknown
push 0x100
lea ecx, [esp + 0xc0]
push ecx
call fcn.0046fe5d
add esp, 0xc
lea edx, [esp + 0xb8]
push edx
call fcn.00401415
push eax
push 0x4a83a0
call fcn.00401a28
mov ecx, dword [esp + 0x1c4]
add esp, 0xc
xor ecx, esp
call fcn.0044c66d
add esp, 0x1bc
ret
Function at 0x401339
Capabilities:
Read file on windows

Disassembly:
jmp 0x440420
push ecx
mov eax, dword [esp + 8]
push edi
push eax
mov dword [esp + 8], 0
call fcn.00401a41
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
jne 0x440443
xor eax, eax
pop edi
pop ecx
ret
push ebx
mov ebx, dword [esp + 0x18]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov esi, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x14]
push ecx
push ebx
push esi
push edi
call ebp
test eax, eax
jne 0x440476
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
jbe 0x44048a
cmp eax, 0x3e5
jne 0x44049b
mov eax, dword [esp + 0x10]
cmp eax, 1
jne 0x4404a8
cmp byte [esi], 0xd
je 0x440454
pop esi
pop ebp
pop ebx
pop edi
pop ecx
ret
je 0x4404c2
cmp eax, 5
jb 0x44049b
cmp eax, 6
jbe 0x4404ae
cmp eax, 0x26
je 0x4404c2
call fcn.0044baf1
mov dword [eax], 9
xor eax, eax
pop esi
pop ebp
pop ebx
pop edi
pop ecx
ret
call fcn.0044baf1
pop esi
pop ebp
pop ebx
mov dword [eax], 9
or eax, 0xffffffff
pop edi
pop ecx
ret
call fcn.0044baf1
pop esi
pop ebp
pop ebx
mov dword [eax], 0
xor eax, eax
pop edi
pop ecx
ret

Function at 0x40143d
Capabilities:
Terminate process

Disassembly:
jmp 0x442840
mov eax, dword [esp + 4]
lea ecx, [eax - 1]
cmp ecx, 0x15
ja 0x44294a
lea ecx, [eax - 1]
cmp ecx, 0xe
push esi
ja case.0x442860.4
movzx edx, byte [ecx + 0x442964]
jmp dword [edx*4 + 0x442950]
mov edx, dword [eax*4 + 0x4a99a0]
cmp edx, 1
je 0x442911
lea ecx, [eax - 1]
mov esi, 1
shl esi, cl
test dword [0x4a99fc], esi
je 0x44289f
add dword [eax*4 + 0x4a9a00], 1
lea eax, [eax*4 + 0x4a9a00]
mov eax, 1
pop esi
ret
test edx, edx
jne 0x44290b
push 0xc000013a
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov edx, dword [eax*4 + 0x4a99a0]
cmp edx, 1
je 0x442911
lea ecx, [eax - 1]
mov esi, 1
shl esi, cl
test dword [0x4a99fc], esi
jne 0x442889
test edx, edx
jne 0x44290b
push 0x25c
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov edx, dword [eax*4 + 0x4a99a0]
cmp edx, 1
je case.0x442860.4
jmp 0x4428ba
mov edx, dword [eax*4 + 0x4a99a0]
cmp edx, 1
je 0x442911
lea ecx, [eax - 1]
mov esi, 1
shl esi, cl
test dword [0x4a99fc], esi
jne 0x442889
test edx, edx
je 0x442911
push eax
call edx
add esp, 4
cmp dword [0x4a9a5c], 0
je 0x442943
push 0x489f88
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub dword [0x4a9a5c], 1
push 0x489f88
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x489fa0]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, 1
pop esi
ret
xor eax, eax
ret
Function at 0x40152d
Capabilities:
Resolve function by parsing pe exports
Terminate process

Disassembly:
jmp 0x447960
sub esp, 0x158
mov eax, dword [0x488180]
xor eax, esp
mov dword [esp + 0x154], eax
mov eax, dword [esp + 0x15c]
push ebx
push esi
push edi
mov edi, dword [eax]
xor ebx, ebx
push edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], ebx
mov esi, edi
call fcn.00401235
add esp, 4
test eax, eax
jne 0x4479db
cmp byte [edi], bl
je 0x4479af
lea ecx, [ecx]
cmp byte [esi], 0x2f
jne 0x4479a8
mov byte [esi], 0x5c
add esi, 1
cmp byte [esi], bl
jne 0x4479a0
cmp esi, edi
mov eax, esi
je 0x4479db
cmp byte [eax], 0x2e
je 0x4479c3
sub eax, 1
cmp eax, edi
jne 0x4479b5
jmp 0x4479db
add eax, 1
cmp eax, edi
je 0x4479db
push eax
call fcn.004014fb
add esp, 4
test eax, eax
jne 0x447b63
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x410
push 8
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x2c]
push edx
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x20]
push ecx
add edx, 4
push edx
mov dword [esp + 0x34], 0x410
mov dword [esp + 0x3c], ebx
call fcn.00401627
add esp, 0x18
test eax, eax
jne 0x447a56
call fcn.0044baf1
mov dword [eax], 0xc
mov eax, dword [esp + 0x10]
push eax
push ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x447b62
mov ecx, dword [esp + 0x18]
push 0x3c
lea edx, [esp + 0x2c]
push ebx
push edx
mov byte [ecx], bl
call fcn.0044c680
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [esp + 0x28], 0x3c
mov dword [esp + 0x2c], 0x500
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], 0xa
call fcn.0040159b
lea ecx, [esp + 0x28]
push ecx
mov esi, eax
call dword [0x48a454]
test eax, eax
je 0x447add
cmp dword [esp + 0x170], ebx
je 0x447ac2
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.0044baf1
mov dword [eax], ebx
mov edx, dword [esp + 0x10]
push edx
push ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x447b62
cmp dword [esp + 0x174], ebx
je 0x447b3f
push esi
call fcn.00401c03
mov ebx, dword [esp + 0x18]
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0x200
push ebx
push 0x409
push eax
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push edi
push 0x47cde4
lea eax, [esp + 0x6c]
push 0x100
push eax
call fcn.0046fe5d
mov ecx, dword [esp + 0x24]
push ecx
lea edx, [esp + 0x78]
push edx
push 0x36
call fcn.0040100a
add esp, 0x1c
xor ebx, ebx
mov eax, dword [esp + 0x10]
push eax
push ebx
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call fcn.00401c03
add esp, 4
call fcn.0044baf1
mov dword [eax], 8
pop ebp
mov ecx, dword [esp + 0x160]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0044c66d
add esp, 0x158
ret
Function at 0x40159b
Capabilities:
Query environment variable
Set environment variable

Disassembly:
jmp 0x4443a0
push 0x4a60ec
push 0x4aa024
call fcn.00401311
add esp, 8
cmp eax, 0x4a82cc
je 0x444445
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push esi
push edi
push 0
push 0
push str.PATH
call ebp
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea edi, [eax + 1]
push edi
push 8
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push edi
push 8
mov ebx, eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push edi
push ebx
push str.PATH
mov esi, eax
call ebp
push eax
push ebx
push esi
call fcn.0044dda0
add esp, 0xc
cmp byte [esi], 0
mov eax, esi
je 0x444422
cmp byte [eax], 0x2f
jne 0x44441a
mov byte [eax], 0x5c
add eax, 1
cmp byte [eax], 0
jne 0x444412
push esi
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
ret
xor eax, eax
ret

Function at 0x4015e1
Capabilities:
Set environment variable

Disassembly:
jmp 0x447820
mov eax, dword [esp + 4]
test eax, eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
push edi
je 0x447879
push eax
call fcn.00401915
mov edi, eax
add esp, 4
test edi, edi
je 0x447879
push edi
call ebp
lea esi, [eax + 1]
push esi
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [0x4a9de4], eax
jne 0x447871
push 0x17
call fcn.0040100a
mov eax, dword [0x4a9de4]
add esp, 4
push edi
push esi
push eax
call fcn.0046fa7a
mov eax, dword [esp + 0x18]
test eax, eax
je 0x447912
push eax
call fcn.00401915
mov esi, eax
add esp, 4
test esi, esi
je 0x4478b3
push esi
call ebp
lea edi, [eax + 1]
push edi
push 8
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push esi
push edi
push eax
mov dword [0x4a9ea8], eax
call fcn.0046fa7a
mov ecx, dword [0x4a9de4]
mov eax, esi
neg eax
sbb eax, eax
and eax, dword [0x4a9ea8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov edx, dword [0x4a9de4]
push str.TCSHONLYSTARTEXES
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x4478e8
call fcn.004015ff
mov eax, dword [0x4a9de4]
push eax
push 0
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call edi
test esi, esi
je 0x44790d
mov ecx, dword [0x4a9ea8]
push ecx
push 0
call ebx
push eax
call edi
pop edi
pop esi
pop ebp
pop ebx
ret
xor esi, esi
jmp 0x4478b3
Function at 0x4015ff
Capabilities:
Query environment variable

Disassembly:
jmp 0x447170
cmp dword [0x48a450], 0
jne 0x44719e
push str.Shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [0x48a450], eax
je 0x44719e
push str.ShellExecuteEx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x48a454], eax
push 0x100
push 0x48a458
push str.TCSHONLYSTARTEXES
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x447228
cmp eax, 0xff
jg 0x447228
cmp eax, 1
jne 0x4471c9
mov dword [0x48b10c], eax
ret
push ebx
push ebp
push edi
mov edi, 0x48a458
mov ebx, edi
mov ebp, 0x48a3b0
push esi
lea esp, [esp]
mov al, byte [edi]
cmp al, 0x3b
je 0x4471ea
test al, al
jne 0x447219
mov eax, edi
sub eax, ebx
je 0x447219
lea esi, [eax + 1]
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push ebx
push esi
push eax
mov dword [ebp], eax
call fcn.0046fa7a
add ebp, 4
cmp byte [edi], 0
lea ebx, [edi + 1]
je 0x447224
add edi, 1
cmp ebp, 0x48a400
jl 0x4471e0
pop esi
pop edi
pop ebp
pop ebx
ret

Function at 0x401613
Capabilities:
Write file on windows

Disassembly:
jmp 0x440510
push ecx
mov eax, dword [esp + 8]
push eax
call fcn.00401a41
mov edx, dword [esp + 0x14]
add esp, 4
push 0
lea ecx, [esp + 4]
push ecx
mov ecx, dword [esp + 0x14]
push edx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x44056f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jl 0x44055f
cmp eax, 6
jle 0x44055f
cmp eax, 0x6d
jne 0x44055f
call fcn.0044baf1
mov dword [eax], 0x20
or eax, 0xffffffff
pop ecx
ret
call fcn.0044baf1
mov dword [eax], 9
or eax, 0xffffffff
pop ecx
ret
mov eax, dword [esp]
test eax, eax
jne 0x440579
or eax, 0xffffffff
pop ecx
ret
Function at 0x401668
Capabilities:
Enumerate files on windows

Disassembly:
jmp 0x4424d0
sub esp, 0x144
mov eax, dword [0x488180]
xor eax, esp
mov dword [esp + 0x140], eax
push ebx
push ebp
mov ebp, dword [esp + 0x150]
xor ebx, ebx
push 0x13c
lea eax, [esp + 0x10]
push ebx
push eax
mov dword [esp + 0x14], ebx
call fcn.0044c680
add esp, 0xc
cmp ebp, ebx
jne 0x442523
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x140]
xor ecx, esp
call fcn.0044c66d
add esp, 0x144
ret
mov eax, dword [ebp + 0xc]
test al, 2
push esi
push edi
je 0x44253e
mov edi, ebp
call fcn.00441f20
test eax, eax
jge 0x4425a9
xor eax, eax
jmp 0x44260e
test al, 1
je 0x4425a9
lea ecx, [esp + 0x10]
push ecx
lea edx, [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
mov eax, dword [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x30]
mov edx, dword [ebp + 0x118]
mov eax, dword [section..data]
mov dword [ebp + 8], ecx
mov dword [ebp], esi
mov dword [edx], eax
add eax, 1
mov dword [section..data], eax
mov eax, dword [ebp + 0x118]
mov dword [eax + 4], ebx
mov ecx, dword [ebp + 0x118]
mov word [ecx + 8], bx
mov edi, dword [ebp + 0x118]
add edi, 0xa
mov ecx, 0x41
lea esi, [esp + 0x3c]
rep movsd dword es:[edi], dword [esi]
and dword [ebp + 0xc], 0xfffffffe
jmp 0x442608
test byte [ebp + 0xc], 2
jne 0x4425c6
mov eax, dword [ebp]
lea edx, [esp + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x442537
mov ecx, dword [ebp + 0x118]
mov eax, dword [section..data]
mov dword [ecx], eax
mov edx, dword [ebp + 0x118]
add eax, 1
mov dword [edx + 4], ebx
mov dword [section..data], eax
mov eax, dword [ebp + 0x118]
mov word [eax + 8], bx
test byte [ebp + 0xc], 2
jne 0x442608
mov edi, dword [ebp + 0x118]
add edi, 0xa
mov ecx, 0x41
lea esi, [esp + 0x3c]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x118]
mov ecx, dword [esp + 0x150]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044c66d
add esp, 0x144
ret
Function at 0x40169a
Capabilities:
Terminate process

Disassembly:
jmp 0x443290
push esi
push 1
push fcn.004019fb
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push 0x489f88
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 2
push 0
push 0
push 0x489fa4
mov dword [0x489f84], 0
mov dword [0x489fa8], 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x4432f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 0
push 0
push 0
call esi
push 0
push 0
push 0
push 0
mov dword [0x489fa0], eax
call esi
push 0
push 0
push 0
push 0
mov dword [0x4a94ac], eax
call esi
push 0
push 0
push 0
push 0
mov dword [0x4a94b0], eax
call esi
cmp dword [0x489fa0], 0
mov dword [0x4a94b4], eax
pop esi
jne 0x443343
jmp fcn.0044d22b
ret

Function at 0x401717
Capabilities:
Query environment variable

Disassembly:
jmp 0x447030
sub esp, 0x404
mov eax, dword [0x488180]
xor eax, esp
mov dword [esp + 0x400], eax
push edi
push 0x400
lea eax, [esp + 8]
push eax
push str.TCSHSUBSTHB
mov byte [esp + 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp byte [esp + 4], 0
lea edi, [esp + 4]
je 0x4470ae
push ebx
push ebp
push esi
mov ebx, edi
mov ebp, 0x48a400
cmp byte [edi], 0x3b
jne 0x4470a3
mov eax, edi
sub eax, ebx
je 0x4470a3
lea esi, [eax + 1]
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push ebx
push esi
push eax
mov dword [ebp], eax
call fcn.0046fa7a
add ebp, 4
lea ebx, [edi + 1]
add edi, 1
cmp byte [edi], 0
jne 0x447074
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x404]
pop edi
xor ecx, esp
call fcn.0044c66d
add esp, 0x404
ret
Function at 0x401753
Capabilities:
Parse pe header
Read file on windows

Disassembly:
jmp 0x448dc0
sub esp, 0x184
mov eax, dword [0x488180]
xor eax, esp
mov dword [esp + 0x180], eax
mov ecx, dword [esp + 0x188]
push ebx
push esi
xor ebx, ebx
push ebx
push 0x40000080
push 3
push ebx
xor eax, eax
push 1
push 0x80000000
push ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x448e2c
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x180]
xor ecx, esp
call fcn.0044c66d
add esp, 0x184
ret
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
push 0x80
lea edx, [esp + 0x118]
push edx
push esi
call edi
test eax, eax
jne 0x448e81
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x448f18
push 1
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x18]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
cmp eax, ebx
je 0x448f18
cmp word [esp + 0x10c], 0x5a4d
jne 0x448f18
mov edx, dword [esp + 0x148]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x20], edx
push 4
lea edx, [esp + 0x30]
push edx
push esi
call edi
test eax, eax
jne 0x448ec6
lea eax, [esp + 0x10]
push eax
push esi
call fcn.004010fa
add esp, 8
test eax, eax
je 0x448f18
cmp dword [esp + 0x24], 0x4550
jne 0x448f18
mov ecx, dword [esp + 0x148]
lea edx, [esp + 0x10]
push edx
add ecx, 0x18
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x20], ecx
push 0xe0
lea ecx, [esp + 0x38]
push ecx
push esi
call edi
test eax, eax
jne 0x448f0b
lea edx, [esp + 0x10]
push edx
push esi
call fcn.004010fa
add esp, 8
test eax, eax
je 0x448f18
cmp word [esp + 0x70], 2
jne 0x448f18
mov ebx, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x18c]
pop edi
pop esi
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.0044c66d
add esp, 0x184
ret
Function at 0x4017e4
Capabilities:
Query environment variable

Disassembly:
jmp 0x448fa0
push ecx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push edi
push 0x105
push 8
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call esi
mov edi, eax
test edi, edi
je 0x44905f
push 0x209
push 8
call ebx
push eax
call esi
mov esi, eax
test esi, esi
je 0x44905f
push 0x104
push edi
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x449049
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0xc]
push eax
push esi
push 0x208
push str..EXE
push ecx
push edi
mov byte [edi + 0x104], 0
call dword [sym.imp.KERNEL32.dll_SearchPathA]
test eax, eax
je 0x449049
cmp eax, 0x208
ja 0x449049
push ebp
push esi
call fcn.00401753
add esp, 4
push edi
push 0
mov ebp, eax
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call edi
push esi
push 0
call ebx
push eax
call edi
mov eax, ebp
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
push edi
push 0
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call edi
push esi
push 0
call ebx
push eax
call edi
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x401884
Capabilities:
Get system information on windows
Terminate process

Disassembly:
jmp 0x445f40
sub esp, 0x24
cmp dword [0x4a9d18], 0
je 0x445fde
mov eax, dword [0x4a9d24]
mov ecx, dword [0x4a9d30]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push edi
push 4
push 0x2000
push eax
push ecx
call esi
mov ecx, dword [0x4a9d30]
cmp eax, ecx
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x445faa
test eax, eax
jne 0x445fa2
call edi
cmp dword [0x4a9aa0], 0
je 0x445f95
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.0044d22b
mov ecx, dword [0x4a9d30]
jmp 0x445faa
mov ecx, eax
mov dword [0x4a9d30], ecx
mov edx, dword [0x4a9d34]
push 4
push 0x1000
sub edx, ecx
push edx
push ecx
call esi
test eax, eax
jne 0x446020
call edi
cmp dword [0x4a9aa0], 0
je 0x445fd4
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
add esp, 0x24
jmp fcn.0044d22b
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 4]
push 4
shl eax, 0xa
push 0x102000
push eax
push 0
mov dword [0x4a9d24], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
mov dword [0x4a9d30], eax
jne 0x446017
call fcn.0044d22b
mov eax, dword [0x4a9d30]
mov dword [0x4a9d34], eax
add esp, 0x24
ret
pop edi
pop esi
add esp, 0x24
ret
Function at 0x4018ac
Capabilities:
Check if file exists

Disassembly:
jmp 0x441a90
sub esp, 0x10
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
push edi
mov edi, dword [esp + 0x20]
push str._dev_tty
push edi
mov dword [esp + 0x14], 0
call esi
test eax, eax
mov ebx, dword [esp + 0x24]
jne 0x441b16
test ebx, ebx
jne 0x441ac3
mov edi, str.CONIN_
jmp 0x441acd
test bl, 1
je 0x441acd
mov edi, str.CONOUT_
mov dword [esp + 0xc], 1
mov eax, ebx
and eax, 3
sub eax, 0
mov dword [esp + 0x10], 0xc
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
je 0x441b55
sub eax, 1
je 0x441b4e
sub eax, 1
je 0x441b47
call fcn.0044baf1
pop edi
pop esi
mov dword [eax], 0x16
or eax, 0xffffffff
pop ebx
add esp, 0x10
ret
push str._dev_null
push edi
call esi
test eax, eax
jne 0x441b29
mov edi, 0x4833c8
jmp 0x441ad5
push str._dev_clipboard
push edi
call fcn.0044fa65
add esp, 8
test eax, eax
jne 0x441ad5
call fcn.00401be5
mov esi, eax
jmp 0x441bff
mov esi, 0xc0000000
jmp 0x441b5a
mov esi, 0x40000000
jmp 0x441b5a
mov esi, 0x80000000
mov eax, ebx
and eax, 0x300
cmp eax, 0x200
jg 0x441b83
je 0x441b7c
test eax, eax
je 0x441b75
cmp eax, 0x100
jmp 0x441b88
mov eax, 3
jmp 0x441b93
mov eax, 5
jmp 0x441b93
cmp eax, 0x300
jne 0x441b01
mov eax, 2
xor ecx, ecx
test bl, 0x40
je 0x441b9f
mov ecx, 0x4000000
push 0
push ecx
push eax
lea eax, [esp + 0x1c]
push eax
push 3
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x441bed
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x441bd8
call fcn.0044baf1
pop edi
mov dword [eax], 2
or eax, esi
pop esi
pop ebx
add esp, 0x10
ret
call fcn.0044baf1
pop edi
pop esi
mov dword [eax], 0xd
or eax, 0xffffffff
pop ebx
add esp, 0x10
ret
test bl, 8
je 0x441bff
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x8000
push esi
call fcn.0040179e
mov esi, eax
add esp, 8
test esi, esi
jge 0x441c21
call fcn.0044d22b
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x10
ret
cmp dword [esp + 0xc], 0
je 0x441c33
mov dword [esi*8 + 0x4a94c4], 2
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x10
ret