joyce8/EMBER2024-capa huggingface dataset:
Function at 0x47b330
Capabilities:
Enumerate pe sections

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
mov al, byte [edi + 6]
test al, al
je 0x47b37d
mov al, byte [edi + 7]
xor ebp, ebp
test al, al
jbe 0x47b3ef
mov ebx, dword [esp + 0x14]
lea esi, [edi + 0x18]
cmp dword [esi - 8], 4
jl 0x47b36b
mov eax, dword [esi]
test byte [eax + 5], 0x11
jne 0x47b36b
push eax
push ebx
call fcn.0047afe0
add esp, 8
xor eax, eax
inc ebp
mov al, byte [edi + 7]
add esi, 0x10
cmp ebp, eax
jl 0x47b353
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [edi + 0x18]
test byte [eax + 5], 0x11
jne 0x47b394
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.0047afe0
add esp, 8
mov eax, dword [edi + 0xc]
test byte [eax + 5], 0x11
jne 0x47b3ab
mov edx, dword [esp + 0x14]
push eax
push edx
call fcn.0047afe0
add esp, 8
mov al, byte [edi + 7]
xor ebx, ebx
test al, al
jbe 0x47b3ef
lea ebp, [edi + 0x20]
mov esi, dword [ebp]
mov al, byte [esi + 5]
test al, al
jne 0x47b3e2
cmp dword [esi + 0x10], 4
jl 0x47b3de
mov eax, dword [esi + 0x18]
test byte [eax + 5], 0x11
jne 0x47b3de
push eax
mov eax, dword [esp + 0x18]
push eax
call fcn.0047afe0
add esp, 8
mov byte [esi + 5], 1
xor ecx, ecx
inc ebx
mov cl, byte [edi + 7]
add ebp, 4
cmp ebx, ecx
jl 0x47b3b7
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x47d980
Capabilities:
Encode data using xor

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
mov eax, ebp
push esi
shr eax, 5
inc eax
push edi
cmp ebp, eax
mov edx, ebp
mov esi, ebp
jb 0x47d9b6
xor ecx, ecx
mov edi, edx
mov cl, byte [ebx + esi - 1]
sub esi, eax
shl edi, 5
add ecx, edi
mov edi, edx
shr edi, 2
add ecx, edi
xor edx, ecx
cmp esi, eax
jae 0x47d99a
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x10]
mov ecx, dword [eax + 8]
mov eax, dword [eax]
dec ecx
and ecx, edx
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x47d9e8
cmp dword [eax + 0xc], ebp
jne 0x47d9e2
mov esi, ebx
mov ecx, ebp
lea edi, [eax + 0x10]
xor ebx, ebx
repe cmpsb byte [esi], byte es:[edi]
je 0x47d9f8
mov ebx, dword [esp + 0x18]
mov eax, dword [eax]
test eax, eax
jne 0x47d9cc
mov ecx, dword [esp + 0x14]
push edx
push ebp
push ebx
push ecx
call fcn.0047da00
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x485c82
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0x24
mov eax, 0x4c50ac
call fcn.004ac335
mov esi, ecx
mov dword [ebp - 0x20], esi
mov eax, dword [esi + 0x60]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x5c]
mov dword [ebp - 0x18], eax
call fcn.0049010e
mov edi, dword [eax + 0xc]
xor ebx, ebx
cmp dword [esi + 0x58], ebx
je 0x485ccd
call fcn.0049010e
mov edi, dword [eax + 0xc]
push 5
push dword [esi + 0x58]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], ebx
je 0x485cde
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], ebx
jne 0x485ceb
or eax, 0xffffffff
jmp 0x485e47
mov ecx, esi
call fcn.004857c9
mov dword [ebp - 0x14], eax
call fcn.00489080
and dword [ebp - 0x28], ebx
cmp dword [ebp - 0x14], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x24], ebx
je 0x485d69
call dword [sym.imp.USER32.dll_GetDesktopWindow]
cmp dword [ebp - 0x14], eax
je 0x485d69
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x485d69
push 0
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
mov dword [ebp - 0x2c], 1
call fcn.0040d6c0
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x24], ebx
je 0x485d69
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x120]
test eax, eax
je 0x485d69
mov ecx, ebx
call fcn.004860ed
test eax, eax
je 0x485d69
push 0
mov ecx, ebx
call fcn.00486108
mov dword [ebp - 0x28], 1
and dword [ebp - 4], 0
push esi
call fcn.0048aa5e
push dword [ebp - 0x14]
call fcn.00488fd8
push edi
push eax
push dword [ebp - 0x1c]
mov ecx, esi
call fcn.00485a8a
xor edi, edi
cmp eax, edi
je 0x485dc6
test byte [esi + 0x3c], 0x10
je 0x485db0
push 4
pop edi
mov ecx, esi
call fcn.00485fd4
test ax, 0x100
je 0x485da6
push 5
pop edi
push edi
mov ecx, esi
call fcn.00488b6e
xor edi, edi
cmp dword [esi + 0x20], edi
je 0x485dc6
push 0x97
push edi
push edi
push edi
push edi
push edi
mov ecx, esi
call fcn.004862a4
or dword [ebp - 4], 0xffffffff
jmp 0x485df1
cmp dword [ebp - 0x28], edi
je 0x485dff
push 1
mov ecx, ebx
call fcn.00486108
cmp dword [ebp - 0x2c], edi
je 0x485e0f
push 1
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp dword [ebp - 0x14], edi
je 0x485e28
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x20]
jne 0x485e28
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x60]
mov ecx, esi
call fcn.00485803
cmp dword [esi + 0x58], edi
je 0x485e44
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [esi + 0x44]
call fcn.004ac3da
ret
Function at 0x48a02e
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 0x50], 0
jne 0x48a067
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0043d030
push eax
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00415dc0
pop esi
ret 4
mov ecx, dword [esi + 0x50]
mov eax, dword [ecx]
pop esi
jmp dword [eax + 0x8c]

Function at 0x48bb7b
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push ebp
push esi
push edi
xor edi, edi
xor ebx, ebx
cmp dword [esp + 0x14], edi
mov ebp, ecx
je 0x48bbbe
call fcn.0049010e
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x48bbbe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x48bbd9
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
push ebx
mov ecx, ebp
call fcn.0048b732
test ebx, ebx
mov esi, eax
je 0x48bbd7
test edi, edi
je 0x48bbd7
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x48d50f
Capabilities:
Get geographical location

Disassembly:
push ebp
lea ebp, [esp - 0xe0]
sub esp, 0x160
mov eax, dword [0x4fcb54]
xor eax, ebp
mov dword [ebp + 0xdc], eax
cmp dword [ebp + 0xec], 0x800
mov eax, dword [ebp + 0xe8]
push esi
mov dword [ebp - 0x3c], eax
mov esi, ecx
lea eax, [ebp - 0x40]
jne 0x48d5a7
push 0x4d3a04
push 4
push eax
call fcn.004a7cdf
push eax
call fcn.00404ce0
add esp, 0x10
push ebx
push edi
call fcn.004a772b
mov edi, dword [eax]
call fcn.004a772b
xor ebx, ebx
mov dword [eax], ebx
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
push esi
push 0x111
mov esi, 0x112
push esi
push eax
call fcn.004a704b
add esp, 0x18
mov dword [ebp - 0x3c], eax
call fcn.004a772b
cmp dword [eax], ebx
je 0x48d5be
call fcn.004a772b
push dword [eax]
call fcn.00484fa7
pop ecx
jmp 0x48d5c5
push 4
push eax
push 3
push dword [ebp + 0xec]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne 0x48d55b
jmp 0x48d637
call fcn.004a772b
mov dword [eax], edi
cmp dword [ebp - 0x3c], 0xffffffff
je 0x48d633
cmp dword [ebp - 0x3c], esi
jae 0x48d633
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push 0x3c
mov esi, eax
lea eax, [ebp - 0x7c]
push ebx
push eax
mov dword [ebp - 0x80], 0x40
call fcn.004ac6c0
add esp, 0xc
push str.KERNEL32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp eax, ebx
je 0x48d625
push str.FindActCtxSectionStringA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x48d625
lea ecx, [ebp - 0x80]
push ecx
push esi
push 2
push ebx
push ebx
call eax
test eax, eax
je 0x48d625
push ebx
push ebx
push esi
jmp 0x48d62b
push ebx
push ebx
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
jmp 0x48d635
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp + 0xdc]
xor ecx, ebp
pop esi
call fcn.004a3135
add ebp, 0xe0
leave
ret
Function at 0x48e3c5
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
je 0x48e40b
call fcn.0049010e
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x48e40b
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [ebp - 4], eax
je 0x48e44e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], 1
je 0x48e437
push dword [ebp + 0x10]
mov eax, dword [edi]
push ebx
push esi
mov ecx, edi
call dword [eax + 0x20]
cmp dword [ebp - 4], 0
mov dword [ebp + 0xc], eax
je 0x48e437
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [esi + 0x4c], 0
je 0x48e44b
mov ecx, dword [esi + 0x4c]
push dword [ebp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0xa0]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x4924dc
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
push dword [ebp + 8]
xor esi, esi
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jne 0x49250c
push dword [ebp + 8]
call edi
push eax
call fcn.004915cd
mov ebx, dword [ebp + 0xc]
movzx eax, byte [ebx + 0x20]
cmp eax, dword [ebp - 4]
je 0x492537
test byte [ebp - 4], 1
je 0x492537
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x492537
push dword [ebp + 8]
call edi
push eax
call fcn.004915cd
lea eax, [ebx + 8]
mov ecx, dword [eax]
or ecx, dword [eax + 4]
je 0x4925f1
lea ecx, [ebp - 0x20]
push ecx
push eax
call fcn.00492441
pop ecx
lea eax, [ebx + 0x10]
pop ecx
mov ecx, dword [eax]
or ecx, dword [eax + 4]
je 0x49256d
lea ecx, [ebp - 0x10]
push ecx
push eax
call fcn.00492441
pop ecx
lea eax, [ebp - 0x10]
pop ecx
mov dword [ebp - 8], eax
mov eax, dword [ebx]
or eax, dword [ebx + 4]
je 0x492583
lea eax, [ebp - 0x18]
push eax
push ebx
call fcn.00492441
pop ecx
pop ecx
lea esi, [ebp - 0x18]
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4925b0
push dword [ebp + 8]
call edi
push eax
call fcn.004915cd
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 8]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jne 0x4925dc
call edi
push ebx
mov dword [ebp - 8], eax
call esi
push dword [ebp + 8]
push dword [ebp - 8]
call fcn.004915cd
push ebx
call esi
test eax, eax
jne 0x4925ee
push dword [ebp + 8]
call edi
push eax
call fcn.004915cd
mov ebx, dword [ebp + 0xc]
movzx eax, byte [ebx + 0x20]
cmp eax, dword [ebp - 4]
je 0x492619
test byte [ebp - 4], 1
jne 0x492619
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x492619
push dword [ebp + 8]
call edi
push eax
call fcn.004915cd
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x493546
Capabilities:
Create http request

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
mov esi, ecx
and dword [esi + 0x10], 0
and dword [esi + 0xc], 0
mov dword [esi + 4], eax
mov eax, dword [ebp + 8]
test eax, eax
mov dword [esi], vtable.CInternetSession.0
jne 0x49356f
call fcn.0049010e
mov eax, dword [eax + 0x10]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
test eax, eax
mov dword [esi + 8], eax
jne 0x493592
push eax
push dword [esi + 4]
call fcn.004934d1
push esi
push eax
mov ecx, 0x501f7c
call fcn.00493187
mov eax, esi
pop esi
pop ebp
ret 0x18
Function at 0x493dd8
Capabilities:
Connect to http server

Disassembly:
push 4
mov eax, 0x4c587c
call fcn.004ac302
mov esi, ecx
mov dword [ebp - 0x10], esi
push dword [ebp + 0x1c]
mov edi, dword [ebp + 8]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call fcn.00493d9a
and dword [ebp - 4], 0
lea ecx, [esi + 0x18]
mov dword [esi], vtable.CHttpConnection.0
call fcn.00402970
push dword [esi + 8]
mov edi, dword [edi + 8]
push 0
push 3
push dword [ebp + 0x18]
mov byte [ebp - 4], 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.WININET.dll_InternetConnectA]
test eax, eax
mov dword [esi + 4], eax
jne 0x493e3e
push eax
push dword [esi + 8]
call fcn.004934d1
push dword [esi + 0xc]
mov ecx, 0x501f7c
push eax
call fcn.00493187
mov eax, esi
call fcn.004ac3da
ret 0x18

Function at 0x4961b1
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4961df
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4961fd
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0049611b
jmp 0x4961fd
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4961fd
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
push eax
mov ecx, esi
call fcn.0049611b
test edi, edi
mov eax, edi
jne 0x4961e7
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
mov ecx, dword [0x501fbc]
test ecx, ecx
je 0x4962c0
jmp 0x4961b0
ret 8

Function at 0x4a0544
Capabilities:
Read file on windows

Disassembly:
cmp dword [esp + 8], 0
push esi
mov esi, ecx
jne 0x4a054d
xor eax, eax
jmp 0x4a05b6
cmp dword [esp + 8], 0
jne 0x4a0559
call fcn.00484c83
push edi
push dword [esi + 0x10]
push dword [esp + 0x14]
push 1
push dword [esp + 0x18]
call fcn.004a6f99
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4a0594
push dword [esi + 0x10]
call fcn.004af086
test eax, eax
pop ecx
jne 0x4a0594
mov esi, dword [esi + 0xc]
call fcn.004a773e
push esi
push dword [eax]
push 1
call fcn.00491587
push dword [esi + 0x10]
call fcn.004af0b5
test eax, eax
pop ecx
je 0x4a05b3
push dword [esi + 0x10]
call fcn.004aefda
push eax
call fcn.00404ce0
pop ecx
pop ecx
jmp 0x4a0582
mov eax, edi
pop edi
pop esi
ret 8

Function at 0x4a05bf
Capabilities:
Write file on windows

Disassembly:
cmp dword [esp + 4], 0
push esi
mov esi, ecx
jne 0x4a05c9
call fcn.00484c83
push dword [esi + 0x10]
push dword [esp + 0x10]
push 1
push dword [esp + 0x14]
call fcn.004a72b7
add esp, 0x10
cmp eax, dword [esp + 0xc]
je 0x4a05f6
mov esi, dword [esi + 0xc]
call fcn.004a773e
push esi
push dword [eax]
push 1
call fcn.00491587
pop esi
ret 8

Function at 0x4a3135
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4fcb54]
jne 0x4a313f
repz ret
jmp fcn.00403220
Function at 0x4a6291
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x4a62be
call fcn.004a773e
mov dword [eax], esi
call fcn.004a772b
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.00404510
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x4a629a
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4a62ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004a7751
pop ecx
call fcn.004a772b
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x4a6314
test al, 1
je 0x4a6314
test byte [esp + 0xc], 2
je 0x4a6314
call fcn.004a773e
mov dword [eax], 5
call fcn.004a772b
mov dword [eax], 0xd
jmp 0x4a62e4
xor eax, eax
pop esi
ret
Function at 0x4a6cfd
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
je 0x4a6d3a
cmp dword [ebp + 0x14], edi
je 0x4a6d3a
cmp ecx, edi
jne 0x4a6d41
call fcn.004a772b
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.00404510
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x4a6d55
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x4a6d76
cmp ebx, 0xffffffff
je 0x4a6d65
push ebx
push edi
push ecx
call fcn.004ac6c0
add esp, 0xc
cmp esi, edi
je 0x4a6d22
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x4a6d22
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x4a6d92
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x4a6d99
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x4a6e8a
test word [esi + 0xc], 0x10c
je 0x4a6ded
mov eax, dword [esi + 4]
test eax, eax
je 0x4a6ded
jl 0x4a6eeb
cmp ebx, eax
mov edi, ebx
jb 0x4a6dbe
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x4a6e92
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.004a2ec4
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x4a6e82
cmp ebx, dword [ebp - 0xc]
jb 0x4a6e5a
cmp dword [ebp - 0xc], 0
je 0x4a6e17
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x4a6e0c
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x4a6e13
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x4a6e22
mov eax, SysReAllocString
cmp ebx, eax
ja 0x4a6e22
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x4a6ebe
push eax
push dword [ebp - 8]
push esi
call fcn.004aee27
pop ecx
push eax
call fcn.004b4fe6
add esp, 0xc
test eax, eax
je 0x4a6efd
cmp eax, 0xffffffff
je 0x4a6eeb
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x4a6e82
push esi
call fcn.004b4905
cmp eax, 0xffffffff
pop ecx
je 0x4a6eef
cmp dword [ebp - 4], 0
je 0x4a6ebe
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec ebx
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x4a6da1
mov eax, dword [ebp + 0x14]
jmp 0x4a6d3c
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x4a6ea9
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.004ac6c0
add esp, 0xc
call fcn.004a772b
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x4a6d32
cmp dword [ebp + 0xc], 0xffffffff
je 0x4a6ed4
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.004ac6c0
add esp, 0xc
call fcn.004a772b
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x4a6d32
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x4a6d3c
or dword [esi + 0xc], 0x10
jmp 0x4a6eef
Function at 0x4b1795
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x4fd8a8]
je 0x4b17b0
inc edi
cmp edi, 0x17
jb 0x4b17a1
cmp edi, 0x17
jae 0x4b1930
push ebp
push 3
call fcn.004c133c
cmp eax, 1
pop ecx
je 0x4b18fc
push 3
call fcn.004c133c
test eax, eax
pop ecx
jne 0x4b17e4
cmp dword [0x4fcda0], 1
je 0x4b18fc
cmp ebx, 0xfc
je 0x4b192f
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x502500
push ebp
call fcn.004a7cdf
add esp, 0xc
test eax, eax
je 0x4b181a
push esi
push esi
push esi
push esi
push esi
call fcn.00404540
add esp, 0x14
push 0x104
mov esi, 0x502519
push esi
push 0
mov byte [0x50261d], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4b185e
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.004a7cdf
add esp, 0xc
test eax, eax
je 0x4b185e
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00404540
add esp, 0x14
push esi
call fcn.004abeb0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4b18a3
push esi
call fcn.004abeb0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x502814
push 0x4d6b14
sub ecx, eax
push ecx
push eax
call fcn.004ac73a
add esp, 0x14
test eax, eax
je 0x4b18a3
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00404540
add esp, 0x14
jmp 0x4b18a5
xor esi, esi
push 0x4d6b10
push ebx
push ebp
call fcn.004adf5b
add esp, 0xc
test eax, eax
je 0x4b18c5
push esi
push esi
push esi
push esi
push esi
call fcn.00404540
add esp, 0x14
push dword [edi*8 + 0x4fd8ac]
push ebx
push ebp
call fcn.004adf5b
add esp, 0xc
test eax, eax
je 0x4b18e7
push esi
push esi
push esi
push esi
push esi
call fcn.00404540
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004c117f
add esp, 0xc
jmp 0x4b192f
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x4b192f
cmp ebp, 0xffffffff
je 0x4b192f
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4fd8ac]
push dword [esi]
call fcn.004abeb0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4c117f
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.004a357c
xor ebx, ebx
cmp dword [0x502a78], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4c1255
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4c1335
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4de988
push edi
call esi
cmp eax, ebx
je 0x4c1335
push eax
call fcn.004a350e
mov dword [esp], 0x4de978
push edi
mov dword [0x502a78], eax
call esi
push eax
call fcn.004a350e
mov dword [esp], 0x4de964
push edi
mov dword [0x502a7c], eax
call esi
push eax
call fcn.004a350e
mov dword [0x502a80], eax
lea eax, [ebp - 0xc]
push eax
call fcn.004a3c3d
test eax, eax
pop ecx
pop ecx
je 0x4c1223
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00404540
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4c1255
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.004a350e
cmp eax, ebx
pop ecx
mov dword [0x502a88], eax
je 0x4c1255
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004a350e
pop ecx
mov dword [0x502a84], eax
mov eax, dword [0x502a84]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x4c12da
cmp dword [0x502a88], ecx
je 0x4c12da
push eax
call fcn.004a3585
push dword [0x502a88]
mov esi, eax
call fcn.004a3585
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x4c12da
cmp edi, ebx
je 0x4c12da
call esi
cmp eax, ebx
je 0x4c12a7
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4c12a7
test byte [ebp - 0x18], 1
jne 0x4c12da
lea eax, [ebp - 0x10]
push eax
call fcn.004a3cb0
test eax, eax
pop ecx
je 0x4c12c2
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00404540
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x4c12d1
or dword [ebp + 0x10], 0x200000
jmp 0x4c1315
or dword [ebp + 0x10], 0x40000
jmp 0x4c1315
mov eax, dword [0x502a7c]
cmp eax, dword [ebp - 8]
je 0x4c1315
push eax
call fcn.004a3585
cmp eax, ebx
pop ecx
je 0x4c1315
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x4c1315
mov eax, dword [0x502a80]
cmp eax, dword [ebp - 8]
je 0x4c1315
push eax
call fcn.004a3585
cmp eax, ebx
pop ecx
je 0x4c1315
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x502a78]
call fcn.004a3585
cmp eax, ebx
pop ecx
je 0x4c1335
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4c1337
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret