joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406e10
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov edi, eax
xor eax, eax
push ebp
push 0x406f48
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0
mov eax, dword [ebp - 4]
push eax
push edi
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
jne 0x406f32
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0xc]
je 0x406e6d
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 8]
jne 0x406f32
cmp dword [ebp - 0x10], 0
jne 0x406e82
mov eax, dword [ebp - 8]
call fcn.00403198
mov bl, 1
jmp 0x406f32
cmp dword [ebp - 0x10], 0x70000000
jb 0x406e90
call fcn.00405884
mov esi, dword [ebp - 0x10]
test esi, esi
sar esi, 0
lea eax, [ebp - 0x14]
mov ecx, esi
xor edx, edx
call fcn.00403278
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
call fcn.00403420
push eax
lea eax, [ebp - 0xc]
push eax
push 0
mov eax, dword [ebp - 4]
push eax
push edi
call sub.advapi32.dll_RegQueryValueExA
cmp eax, 0xea
je 0x406e36
test eax, eax
jne 0x406f32
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0xc]
je 0x406ee0
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 8]
jne 0x406f32
mov esi, dword [ebp - 0x10]
test esi, esi
sar esi, 0
jmp 0x406eeb
dec esi
test esi, esi
je 0x406ef9
mov eax, dword [ebp - 0x14]
cmp byte [eax + esi - 1], 0
je 0x406eea
cmp dword [ebp - 0xc], 7
jne 0x406f04
test esi, esi
je 0x406f04
inc esi
lea eax, [ebp - 0x14]
mov edx, esi
call fcn.004034f0
cmp dword [ebp - 0xc], 7
jne 0x406f25
test esi, esi
je 0x406f25
lea eax, [ebp - 0x14]
call fcn.00403420
mov byte [eax + esi - 1], 0
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
call fcn.004031e8
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406f4f
lea eax, [ebp - 0x14]
call fcn.00403198
ret

Function at 0x407890
Capabilities:
Hash data with crc32

Disassembly:
push esi
xor esi, esi
mov ecx, 0x40c55c
mov eax, esi
mov edx, 8
test al, 1
je 0x4078ac
shr eax, 1
xor eax, 0xedb88320
jmp 0x4078ae
shr eax, 1
dec edx
jne 0x40789f
mov dword [ecx], eax
inc esi
add ecx, 4
cmp esi, 0x100
jne 0x407898
pop esi
ret

Function at 0x4078c4
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
mov edi, edx
mov ebx, eax
cmp dword [0x40c558], 0
jne 0x4078e7
call fcn.00407890
push 1
push 0x40c558
call sub.kernel32.dll_InterlockedExchange
mov eax, edi
test esi, esi
je 0x407912
mov edx, ebx
and dx, 0xff
xor ecx, ecx
mov cl, byte [eax]
xor dx, cx
movzx edx, dx
mov edx, dword [edx*4 + 0x40c55c]
shr ebx, 8
xor edx, ebx
mov ebx, edx
dec esi
inc eax
test esi, esi
jne 0x4078ed
mov eax, ebx
pop edi
pop esi
pop ebx
ret
Function at 0x408fbc
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
mov esi, edx
mov ebx, eax
lea edx, [ebp - 0xc]
mov eax, ebx
call fcn.00408f70
test al, al
jne 0x408fdd
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x409029
xor eax, eax
push ebp
push 0x409019
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
call fcn.00403414
push eax
call sub.kernel32.dll_DeleteFileA
mov dword [ebp - 4], eax
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x10], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409020
lea eax, [ebp - 0xc]
call fcn.00408fac
ret
mov eax, dword [ebp - 4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x409330
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
push edi
mov esi, eax
xor eax, eax
push ebp
push 0x40941f
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
call fcn.00406cf4
mov edx, dword [ebp - 8]
mov ecx, 0x409438
xor eax, eax
call fcn.00409224
push 0
mov eax, dword [ebp - 4]
call fcn.00403414
push eax
call sub.kernel32.dll_CreateDirectoryA
test eax, eax
jne 0x4093ed
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
cmp ebx, 0xb7
je 0x409350
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x18]
mov edx, dword [ebp - 4]
mov al, 0x36
call fcn.00408dd8
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x1c]
mov eax, ebx
call fcn.00404c94
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x20]
mov eax, ebx
call fcn.00407284
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x14]
mov ecx, 2
mov al, 0x68
call fcn.00408da8
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, 0x404660
call fcn.00405890
call fcn.00402eb4
jmp 0x409350
mov eax, esi
mov edx, dword [ebp - 4]
call fcn.0040322c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409426
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.004031b8
lea eax, [ebp - 8]
mov edx, 2
call fcn.004031b8
ret

Function at 0x409448
Capabilities:
Shutdown system

Disassembly:
add esp, 0xffffffec
cmp dword [0x40b07c], 2
jne 0x4094af
push esp
push 0x28
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
test eax, eax
jne 0x40946a
xor eax, eax
jmp 0x4094be
lea eax, [esp + 8]
push eax
push 0x4094c4
push 0
call sub.advapi32.dll_LookupPrivilegeValueA
mov dword [esp + 4], 1
mov dword [esp + 0x10], 2
push 0
push 0
push 0
lea eax, [esp + 0x10]
push eax
push 0
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_AdjustTokenPrivileges
call sub.kernel32.dll_GetLastError_1
test eax, eax
je 0x4094af
xor eax, eax
jmp 0x4094be
push 0
push 2
call sub.user32.dll_ExitWindowsEx
neg eax
sbb eax, eax
neg eax
add esp, 0x14
ret
Function at 0x4094d8
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
mov esi, ecx
dec esi
test esi, esi
jl 0x409532
inc esi
xor edi, edi
cmp edi, 1
jne 0x4094fe
mov eax, dword [ebp + 0xc]
push eax
call sub.kernel32.dll_Sleep
jmp 0x40950c
cmp edi, 1
jle 0x40950c
mov eax, dword [ebp + 8]
push eax
call sub.kernel32.dll_Sleep
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00408fbc
test eax, eax
jne 0x409532
call sub.kernel32.dll_GetLastError_1
cmp eax, 2
je 0x409532
call sub.kernel32.dll_GetLastError_1
cmp eax, 3
je 0x409532
inc edi
dec esi
jne 0x4094ee
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8

Function at 0x40953c
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov edi, ecx
mov byte [ebp - 1], dl
mov esi, eax
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax], edx
mov byte [ebp - 2], 0
test edi, edi
je 0x409589
xor ebx, ebx
jmp 0x40957e
mov eax, dword [ebp - 8]
mov edx, dword [eax]
mov eax, edi
call fcn.00404c40
test eax, eax
jne 0x40957d
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 2
jmp 0x409639
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call esi
test al, al
jne 0x40955f
mov al, byte [ebp - 1]
sub al, 1
jb 0x409594
je 0x40959d
jmp 0x4095a6
call fcn.00407024
mov edi, eax
jmp 0x4095a8
call sub.kernel32.dll_GetUserDefaultLangID
mov edi, eax
jmp 0x4095a8
xor edi, edi
test di, di
je 0x409639
xor ebx, ebx
jmp 0x4095e4
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x28]
movzx edx, di
cmp eax, edx
jne 0x4095e3
mov eax, dword [ebp - 8]
cmp dword [eax + 0x2c], 0
je 0x4095d8
call sub.kernel32.dll_GetACP
mov edx, dword [ebp - 8]
cmp eax, dword [edx + 0x2c]
jne 0x4095e3
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 1
jmp 0x409639
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call esi
test al, al
jne 0x4095b5
xor ebx, ebx
jmp 0x40962e
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x28]
and eax, 0x3ff
mov edx, edi
and dx, 0x3ff
movzx edx, dx
cmp eax, edx
jne 0x40962d
mov eax, dword [ebp - 8]
cmp dword [eax + 0x2c], 0
je 0x409622
call sub.kernel32.dll_GetACP
mov edx, dword [ebp - 8]
cmp eax, dword [edx + 0x2c]
jne 0x40962d
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 1
jmp 0x409639
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call esi
test al, al
jne 0x4095f3
mov al, byte [ebp - 2]
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 4
Function at 0x4099ec
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x409abf
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x409ad8
push ebx
push 0x409ae4
push esi
lea eax, [ebp - 4]
mov edx, 4
call fcn.004033b4
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.0040277c
mov dword [ebp - 0x48], 0x44
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00403414
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x409a6c
mov al, 0x6a
call fcn.00409648
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle_1
call fcn.004099c0
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x409a75
call fcn.004099c0
push edi
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409ac6
lea eax, [ebp - 4]
call fcn.00403198
ret

Function at 0x409b78
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffbc
mov edi, eax
lea esi, [esp + 0x28]
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemInfo
mov ebx, edi
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x409c2c
jmp 0x409c21
cmp dword [esi + 0x10], 0x1000
jne 0x409c0d
test byte [esi + 0x15], 1
jne 0x409c0d
xor ebx, ebx
mov eax, dword [esi + 0x14]
cmp eax, 1
je 0x409bcc
cmp eax, 2
je 0x409bcc
cmp eax, 0x10
je 0x409bcc
cmp eax, 0x20
jne 0x409be1
push esp
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x409be1
mov bl, 1
xor ebp, ebp
jmp 0x409bf2
mov eax, dword [esi]
add eax, ebp
call fcn.00409b70
add ebp, dword [esp + 8]
cmp ebp, dword [esi + 0xc]
jb 0x409be5
test bl, bl
je 0x409c0d
push esp
mov eax, dword [esp + 4]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [esi]
add eax, dword [esi + 0xc]
mov ebx, eax
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x409c2c
mov eax, dword [esi + 4]
cmp eax, edi
je 0x409ba4
add esp, 0x44
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
mov ebx, 0x408f6c
nop
mov ecx, 0x5b182006
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x430024
nop
nop
nop
nop
mov eax, section..data
nop
mov ebx, 0x42e3d0
mov ecx, 0x5ed40142
nop
nop
nop
nop
nop
test eax, eax
nop
je 0x430084
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
add eax, 4
nop
nop
nop
nop
nop
nop
cmp eax, ebx
jne 0x43006c
nop
nop
nop
nop
nop
nop
popal
nop
nop
nop
jmp 0x401219
Function at 0x401451
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push dword [esp + 0xc]
push dword [esp + 0xc]
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x40147b
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x14]
test eax, eax
mov dword [ecx], eax
jne 0x40147f
xor eax, eax
pop esi
ret
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, dword [esp + 0x10]
push 1
mov dword [ecx], eax
pop eax
pop esi
ret

Function at 0x40149a
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
push edi
xor edi, edi
push edi
push 1
push edi
lea eax, [ebp - 4]
push edi
push eax
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
call esi
test eax, eax
jne 0x4014db
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x4014ee
push 8
push 1
push edi
lea eax, [ebp - 4]
push edi
push eax
call esi
test eax, eax
je 0x4014ee
lea eax, [ebp - 8]
push eax
push 4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x4014f2
xor eax, eax
jmp 0x401504
cmp dword [ebp - 4], edi
je 0x401501
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 8]
pop edi
pop esi
leave
ret

Function at 0x401944
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, dword [esp + 8]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebp
xor esi, esi
call edi
test eax, eax
jbe 0x40197b
push ebx
mov ebx, ebp
sub ebx, str.svchost.exe
mov al, byte [ebx + esi + str.svchost.exe]
push ebp
xor al, 1
mov byte [esi + str.svchost.exe], al
inc esi
call edi
cmp esi, eax
jb 0x401963
pop ebx
and byte [esi + str.svchost.exe], 0
pop edi
pop esi
mov eax, str.svchost.exe
pop ebp
ret
Function at 0x405320
Capabilities:
Query environment variable

Disassembly:
push edi
push esi
mov edi, ecx
push ebx
sub esp, 0x10
mov esi, dword [esp + 0x20]
mov dword [esp], esi
call sub.msvcrt.dll_getenv
cmp byte [edi + 1], 0
invalid
Function at 0x40ad00
Capabilities:
Encode data using xor

Disassembly:
fnsave dword [ebx]
mov esp, 0xd85cda3d
cmp eax, 0x31d85cda
fnsave dword [ebx]
mov esp, 0xd95cd63d
or ebx, ebp
pop edi
mov ebp, 0x9c5c863d
or ebx, ebp
pop edi
mov ebp, 0xd95c8638
xor ebp, ebx
cmp eax, 0x31d85cda
fnsave dword [ebx]
mov esp, 0xd95cd63d
or ebx, ebp
pop edi
mov ebp, 0x9c5c863d
or ebx, ebp
pop edi
mov ebp, 0xd95c8638
xor ebp, ebx
pop edx
mov ebp, 0xad5cb838
xor ebp, ebx
pop ebx
mov ebp, 0xad5cb43d
xor ebp, ebx
xor bh, byte [ebx + edi + 0x1bad5cbc]
fisttp qword [edi]
mov esp, 0xac5cda3d
or ebx, esi
jno 0x40acfd
cmp eax, 0xbd85cda
fstp qword [edi - 0x43]
cmp eax, 0x1bad5cd6
fstp qword [edi - 0x43]
cmp eax, 0xb9d5c8a
fstp qword [edi - 0x43]
cmp dh, dl
pop esp
movsb byte es:[edi], byte [esi]
or ebx, ebp
pop edx
mov ebp, 0xad5c8a3d
xor ebp, ebx
push esi
mov ebp, 0xad5cda3d
xor ebp, ebx
xor al, 0xbc
cmp edi, dword [esp + ebx*2 + 0x52dd1bad]
mov ebp, 0xac5cda3d
xor esi, ebx
lodsd eax, dword [esi]
mov esi, 0xd95cda3d
sbb ebx, ebp
xor edi, dword [ebp + edi + 0x31895cd6]
fstp qword [edi - 0x43]
cmp eax, 0x41a75c8a
fstp qword [edi - 0x43]
cmp dl, bl
pop esp
mov cl, byte [ebx]
fstp qword [edx - 0x43]
cmp byte [esi - 0x22ce52a4], cl
push esi
mov ebp, 0xad5cda38
xor ebp, ebx
or edi, dword [eax + edi + 0x1bad5cda]
invalid
Function at 0x412fd0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov dword [ebp - 0x1c], eax
movzx eax, byte [eax]
cmp al, 0x40
mov byte [ebp - 0x20], al
je 0x412ff0
cmp al, 0x24
jne 0x41311b
nop
mov eax, dword [ebp - 0x1c]
lea esi, [eax + 1]
movzx eax, byte [eax + 1]
mov dword [ebp - 0x24], esi
test al, al
je 0x413128
cmp al, 0x2f
je 0x413128
cmp al, 0x5c
je 0x413128
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
add eax, 2
jmp 0x41302f
add eax, 1
cmp dl, 0x2f
je 0x41303d
cmp dl, 0x5c
je 0x41303d
mov ecx, edi
movzx edx, byte [eax]
lea edi, [ecx + 1]
mov esi, eax
mov ebx, edi
test dl, dl
jne 0x413020
lea eax, [ecx + 2]
add eax, 0x1e
shr eax, 4
shl eax, 4
call fcn.00484160
sub esp, eax
mov eax, dword [ebp - 0x24]
lea edi, [esp + 0x1b]
mov dword [esp + 8], ebx
and edi, 0xfffffff0
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll_strncpy
cmp byte [ebp - 0x20], 0x40
mov byte [edi + ebx], 0
je 0x4130c0
mov dword [esp], edi
call sub.msvcrt.dll_getenv
test eax, eax
je 0x413111
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00475200
mov ebx, eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_free
movzx eax, byte [ebx]
cmp al, 0x40
mov byte [ebp - 0x20], al
je 0x4130b3
cmp al, 0x24
jne 0x41311e
mov dword [ebp - 0x1c], ebx
jmp 0x412ff0
mov dword [esp + 8], 0
mov dword [esp + 4], str._ROOT
mov dword [esp], edi
call fcn.00475200
mov dword [esp], eax
mov ebx, eax
call sub.msvcrt.dll_getenv
test eax, eax
je 0x4130f6
mov dword [esp], ebx
mov dword [ebp - 0x20], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x20]
jmp 0x413084
mov eax, dword [str.C:_msys64_mingw32]
mov dword [esp], ebx
mov dword [ebp - 0x20], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x413084
mov eax, str.C:_msys64_mingw32
jmp 0x413084
mov ebx, dword [ebp - 0x1c]
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [ebp - 0x24]
mov eax, 1
xor ebx, ebx
jmp 0x413040
Function at 0x424160
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x1c
mov dword [esp], str.COLUMNS
call sub.msvcrt.dll_getenv
test eax, eax
je 0x424183
mov dword [esp], eax
call fcn.004918f8
test eax, eax
jle 0x424183
add esp, 0x1c
ret
mov eax, 0x7fffffff
add esp, 0x1c
ret
Function at 0x4299f0
Capabilities:
Read file on windows

Disassembly:
mov edx, dword [eax + 0x14]
test edx, edx
je 0x429a04
cmp edx, dword [eax + 0x10]
je 0x429a04
sub edx, 1
cmp dword [eax + 0x18], edx
jb 0x429a22
push esi
push ebx
mov ebx, eax
sub esp, 0x14
mov eax, dword [eax + 8]
mov dword [esp], eax
call sub.msvcrt.dll_feof
test eax, eax
je 0x429a25
xor eax, eax
add esp, 0x14
pop ebx
pop esi
ret
xor eax, eax
ret
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x429a1a
mov esi, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
cmp esi, edx
je 0x429a80
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 8]
sub esi, edx
add eax, edx
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [esp + 0xc], ecx
call sub.msvcrt.dll_fread
mov esi, eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x429a1a
add dword [ebx + 0x14], esi
test esi, esi
setne al
jmp 0x429a1c
test esi, esi
jne 0x429ab0
mov eax, 0x1001
mov esi, 0x1000
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xc]
mov dword [esp], eax
call fcn.004791b0
mov dword [ebx + 0x10], esi
mov dword [ebx + 0xc], eax
mov edx, dword [ebx + 0x14]
jmp 0x429a41
add esi, esi
lea eax, [esi + 1]
jmp 0x429a8e
Function at 0x460120
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
mov dword [esp + 8], 0
mov ebx, dword [esp + 0x3c]
mov esi, dword [esp + 0x48]
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll__lseek
test eax, eax
js 0x4601e2
mov eax, dword [esp + 0x44]
mov dword [esp + 4], ebx
xor ebp, ebp
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call fcn.0045ec00
test eax, eax
mov dword [esi + 4], eax
je 0x46019e
mov dword [esi], eax
mov dword [esi + 8], ebx
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll__read_1
test eax, eax
js 0x460210
cmp ebx, eax
mov ebp, 1
ja 0x4601b0
add esp, 0x1c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x44]
mov dword [esp + 8], 0
xor ebp, ebp
mov dword [esp + 4], str.file_too_short
mov dword [esp], eax
call dword [esp + 0x40]
mov eax, dword [esi + 4]
mov dword [esp], eax
call sub.msvcrt.dll_free
add esp, 0x1c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
xor ebp, ebp
mov dword [esp + 4], str.lseek
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call dword [esp + 0x40]
add esp, 0x1c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp + 4], str.read
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call dword [esp + 0x40]
mov eax, dword [esi + 4]
mov dword [esp], eax
call sub.msvcrt.dll_free
jmp 0x46019e
Function at 0x483540
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
lea ebx, [esp + 0x24]
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
jmp fcn.004835a0

Function at 0x4835a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x5b3500]
test esi, esi
jle 0x48368d
mov edi, dword [0x5b3504]
xor ebx, ebx
lea edx, [edi + 4]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x4835d4
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x483686
add ebx, 1
add edx, 0xc
cmp ebx, esi
jne 0x4835c0
mov dword [esp], eax
mov esi, eax
call fcn.00483ef0
test eax, eax
mov edi, eax
je 0x4836ca
mov esi, dword [0x5b3504]
lea ebx, [ebx + ebx*2]
shl ebx, 2
add esi, ebx
mov dword [esi + 8], eax
mov dword [esi], 0
call fcn.00484000
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov eax, dword [0x5b3504]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x4836aa
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x48367f
sub eax, 0x40
and eax, 0xffffffbf
je 0x48367f
mov eax, dword [esp + 0x20]
add ebx, dword [0x5b3504]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x483694
add dword [0x5b3500], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
xor ebx, ebx
jmp 0x4835de
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00483540
mov eax, dword [0x5b3504]
mov eax, dword [eax + ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00483540
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00483540
lea esi, [esi]