joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4982b3
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push 0x104
push 0
lea eax, [ebp - 0x108]
push eax
call fcn.004adbd0
add esp, 0xc
movsx ecx, byte [ebp + 8]
push ecx
push 0x529dc4
lea edx, [ebp - 0x108]
push edx
call fcn.004ae0dd
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 5
jne 0x498305
xor eax, eax
jmp 0x498347
push 0x104
push 0
lea ecx, [ebp - 0x108]
push ecx
call fcn.004adbd0
add esp, 0xc
movsx edx, byte [ebp + 8]
push edx
push 0x529dc8
lea eax, [ebp - 0x108]
push eax
call fcn.004ae0dd
add esp, 0xc
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x108]
push edx
call fcn.00498236
add esp, 8
mov esp, ebp
pop ebp
ret

Function at 0x4983f6
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov dword [0x52ea14], 0xff
mov dword [0x52ea10], 0xff
mov dword [ebp - 0x11c], 0
jmp 0x49842e
mov eax, dword [ebp - 0x11c]
add eax, 1
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 0x18
jge 0x498486
mov ecx, dword [ebp - 0x11c]
mov edx, dword [ebp - 0x11c]
mov dword [ecx*8 + 0x52e5e0], edx
mov dword [ebp - 0x124], 0
jmp 0x498465
mov eax, dword [ebp - 0x124]
add eax, 1
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 4
jge 0x498484
mov ecx, dword [ebp - 0x11c]
mov edx, dword [ebp - 0x124]
mov byte [edx + ecx*8 + 0x52e5e4], 0xff
jmp 0x498456
jmp 0x49841f
mov byte [ebp - 0x128], 0
push 0x104
push 0
lea eax, [ebp - 0x118]
push eax
call fcn.004adbd0
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4984c5
mov dl, byte [ebp - 0x118]
mov byte [ebp - 0x128], dl
mov byte [ebp - 0x10], 0
push 0x104
push 0
lea eax, [ebp - 0x22c]
push eax
call fcn.004adbd0
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x22c]
push ecx
call fcn.00495d27
add esp, 8
mov dl, byte [ebp - 0x22c]
mov byte [ebp - 0x10], dl
mov dword [ebp - 0x11c], 0
jmp 0x498517
mov eax, dword [ebp - 0x11c]
add eax, 1
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 0x18
jge 0x4985c2
mov ecx, dword [ebp - 0x11c]
add ecx, 0x43
mov byte [ebp - 0x120], cl
push 8
push 0
lea edx, [ebp - 8]
push edx
call fcn.004adbd0
add esp, 0xc
lea eax, [ebp - 8]
push eax
mov cl, byte [ebp - 0x120]
push ecx
call fcn.004982b3
add esp, 8
test eax, eax
je 0x4985bd
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 4]
sub eax, 1
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 4
jl 0x498571
jmp 0x498508
cmp dword [ebp - 0x14], 0
jge 0x498579
jmp 0x498508
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
mov al, byte [ebp - 0x120]
mov byte [edx + ecx*8 + 0x52e5e4], al
movsx ecx, byte [ebp - 0x120]
movsx edx, byte [ebp - 0x128]
cmp ecx, edx
jne 0x4985a6
mov eax, dword [ebp - 0xc]
mov dword [0x52ea14], eax
movsx ecx, byte [ebp - 0x120]
movsx edx, byte [ebp - 0x10]
cmp ecx, edx
jne 0x4985bd
mov eax, dword [ebp - 0xc]
mov dword [0x52ea10], eax
jmp 0x498508
mov esp, ebp
pop ebp
ret
Function at 0x49953c
Capabilities:
Print debug messages
Unmount volume via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov dword [ebp - 0x410], 0
cmp dword [ebp + 8], 0xffffffff
jne 0x499567
push str._Inquiry_And_ReadFlashID_:_Device_handle_is_not_valid_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x499655
push 0
lea eax, [ebp - 0x414]
push eax
push 0
push 0
push 0
push 0
push 0x90018
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0
lea edx, [ebp - 0x414]
push edx
push 0
push 0
push 0
push 0
push 0x90020
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0x400
lea ecx, [ebp - 0x400]
push ecx
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x40c]
push eax
call fcn.00499659
add esp, 0x10
mov dword [ebp - 0x410], eax
push 0
lea ecx, [ebp - 0x414]
push ecx
push 0
push 0
push 0
push 0
push 0x9001c
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0
lea eax, [ebp - 0x414]
push eax
push 0
push 0
push 0
push 0
push 0x90028
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp dword [ebp - 0x410], 0
je 0x49964f
cmp dword [ebp + 0x10], 0x400
ja 0x499637
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0x400]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004ae270
add esp, 0xc
jmp 0x49964f
push 0x400
lea edx, [ebp - 0x400]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004ae270
add esp, 0xc
mov eax, dword [ebp - 0x410]
mov esp, ebp
pop ebp
ret

Function at 0x49b5e0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
mov dword [ebp - 0x94], 0x94
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0x98], 0
cmp dword [ebp - 0x90], 4
jne 0x49b642
cmp dword [ebp - 0x8c], 0x5a
je 0x49b640
mov dword [ebp - 0xa4], 1
jmp 0x49b671
cmp dword [ebp - 0x90], 5
jne 0x49b671
cmp dword [ebp - 0x8c], 0
jne 0x49b65e
mov dword [ebp - 0x9c], 1
cmp dword [ebp - 0x8c], 1
jne 0x49b671
mov dword [ebp - 0x98], 1
mov eax, dword [ebp - 0xa4]
mov esp, ebp
pop ebp
ret

Function at 0x49b67b
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
mov dword [ebp - 0x94], 0x94
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0x98], 0
cmp dword [ebp - 0x90], 4
jne 0x49b6dd
cmp dword [ebp - 0x8c], 0x5a
je 0x49b6db
mov dword [ebp - 0xa4], 1
jmp 0x49b70c
cmp dword [ebp - 0x90], 5
jne 0x49b70c
cmp dword [ebp - 0x8c], 0
jne 0x49b6f9
mov dword [ebp - 0x9c], 1
cmp dword [ebp - 0x8c], 1
jne 0x49b70c
mov dword [ebp - 0x98], 1
mov eax, dword [ebp - 0x9c]
mov esp, ebp
pop ebp
ret
Function at 0x49b7d0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push esi
push edi
cmp dword [0x52fd54], 0
je 0x49b80e
mov edi, 0x529f04
lea edx, [ebp - 0x100]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x49b836
mov edi, 0x529f30
lea edx, [ebp - 0x100]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x100]
push edx
call fcn.004ade40
add esp, 8
lea eax, [ebp - 0x108]
push eax
push 0x20019
push 0
lea ecx, [ebp - 0x100]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x10c], eax
cmp dword [ebp - 0x108], 0xffffffff
je 0x49b8b6
mov dword [ebp - 0x104], 0xff
lea edx, [ebp - 0x104]
push edx
mov eax, dword [ebp + 0xc]
push eax
push 0
push 0
push str.CreateFileName
mov ecx, dword [ebp - 0x108]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x10c], eax
mov edx, dword [ebp - 0x108]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4a1767
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x55c
mov dword [ebp - 0x558], 0
mov eax, dword [ebp + 0x14]
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push str._s_s
lea eax, [ebp - 0x108]
push eax
call fcn.004ae0dd
add esp, 0x10
push 0x52fd68
mov ecx, dword [ebp - 4]
push ecx
call fcn.004ade30
add esp, 8
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x310]
push eax
call fcn.004ade30
add esp, 8
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x310]
push eax
push str._s_s_s
lea ecx, [ebp - 0x554]
push ecx
call fcn.004ae0dd
add esp, 0x14
lea edx, [ebp - 0x450]
push edx
lea eax, [ebp - 0x554]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x55c], eax
cmp dword [ebp - 0x55c], 0xffffffff
jne 0x4a180d
xor eax, eax
jmp 0x4a190b
mov dword [ebp - 8], 0
mov dword [ebp - 0x558], 0
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.USER32.dll_CharUpperA]
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.USER32.dll_CharUpperA]
cmp dword [ebp - 8], 0
jne 0x4a18e2
lea eax, [ebp - 0x424]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call fcn.004ade30
add esp, 8
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.USER32.dll_CharUpperA]
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call fcn.004ae830
add esp, 8
test eax, eax
je 0x4a18b3
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0x20c]
push eax
call fcn.004ae830
add esp, 8
test eax, eax
je 0x4a18b3
lea ecx, [ebp - 0x310]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.004ade30
add esp, 8
lea eax, [ebp - 0x424]
push eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.004ade40
add esp, 8
lea edx, [ebp - 0x450]
push edx
mov eax, dword [ebp - 0x55c]
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4a18dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x4a18dd
mov dword [ebp - 8], 1
jmp 0x4a1832
mov ecx, dword [ebp - 0x55c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 0x14]
push eax
call fcn.004ade30
add esp, 8
mov ecx, dword [ebp - 4]
push ecx
call fcn.004aeac0
add esp, 4
mov esp, ebp
pop ebp
ret
Function at 0x4b0e8b
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
jne 0x4b0ea8
call fcn.004b1b35
mov dword [eax], 0x16
xor eax, eax
jmp 0x4b0f11
xor ecx, ecx
push esi
mov edx, 0x8c
inc ecx
call fcn.004b7a0a
mov esi, eax
test esi, esi
je 0x4b0efc
push esi
call fcn.004b45c8
mov eax, dword [ebp + 0x14]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
pop ecx
mov dword [esi + 0x4c], edi
jne 0x4b0eda
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x4b0df6
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x4b0f10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.004ae5ad
test ebx, ebx
pop ecx
je 0x4b0f0e
push ebx
call fcn.004b1b5b
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4b4ed6
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
jne 0x4b4ef4
xor eax, eax
jmp 0x4b5062
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x532600]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x4b4f27
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.004bda82
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x4b4ff9
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edi
jbe 0x4b5031
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
mov dword [ebp - 8], edi
cmp ecx, dword [ebp + 0x10]
jae 0x4b4f82
mov edx, dword [ebp - 0xc]
inc dword [ebp - 0xc]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4b4f73
inc dword [ebp - 0x14]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 8]
mov byte [eax], dl
inc eax
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x400
jl 0x4b4f56
mov edi, eax
lea eax, [ebp - 0x41c]
sub edi, eax
push 0
lea eax, [ebp - 0x18]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4b4fc2
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x10], eax
cmp eax, edi
jl 0x4b4fcb
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x4b4f47
jmp 0x4b4fcd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
xor edi, edi
mov eax, dword [ebp - 0x10]
cmp eax, edi
jne 0x4b505d
cmp dword [ebp - 4], edi
je 0x4b5031
push 5
pop esi
cmp dword [ebp - 4], esi
jne 0x4b5026
call fcn.004b1b35
mov dword [eax], 9
call fcn.004b1b48
mov dword [eax], esi
jmp 0x4b5058
push edi
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4b501b
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], eax
jmp 0x4b4fcd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x4b4fcd
push dword [ebp - 4]
call fcn.004b1b5b
pop ecx
jmp 0x4b5058
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4b5046
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x4b5046
xor eax, eax
jmp 0x4b5060
call fcn.004b1b35
mov dword [eax], 0x1c
call fcn.004b1b48
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x4b5060
sub eax, dword [ebp - 0x14]
pop esi
pop ebx
pop edi
leave
ret
Function at 0x4ba42e
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.004ae230
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4ba4c9
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x531e14]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x4ba4c9
cmp eax, 1
je 0x4ba4ea
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4ba4c9
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4ba496
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4ba4c5
xor eax, eax
inc eax
jmp 0x4ba509
cmp edi, eax
jae 0x4ba4cd
xor eax, eax
jmp 0x4ba509
cmp eax, esi
jae 0x4ba4d4
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x531e14]
jmp 0x4ba4ed
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4ba511
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 8]
xor eax, eax
cmp ecx, dword [eax*8 + 0x52c6f0]
je 0x4ba529
inc eax
cmp eax, 0x12
jb 0x4ba51a
push esi
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x52c6f0]
mov dword [ebp + 8], esi
jne 0x4ba66f
mov eax, dword [0x531e60]
cmp eax, 1
push ebx
je 0x4ba63f
test eax, eax
jne 0x4ba55e
cmp dword [0x52bd24], 1
je 0x4ba63f
cmp ecx, 0xfc
je 0x4ba66e
push edi
push 6
pop ecx
mov esi, str.Runtime_Error__n_nProgram:
mov edi, 0x532098
rep movsd dword es:[edi], dword [esi]
push 0x104
mov ebx, 0x5320b2
push ebx
movsw word es:[edi], word [esi]
push 0
mov byte [0x5321b6], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4ba5ac
push 5
pop ecx
mov esi, str._program_name_unknown_
mov edi, 0x5320b2
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4ba5b1
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x4ba5e4
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4ba5c5
sub eax, edx
push 3
lea eax, [eax + 0x532077]
push 0x4fb27c
push eax
call fcn.004bec80
add esp, 0xc
mov edx, 0x532098
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4ba5ec
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x52c6f4]
mov esi, 0x4fb278
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4ba607
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4ba613
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.004c07ec
add esp, 0xc
pop edi
jmp 0x4ba66e
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x4ba66e
mov esi, dword [esi + 0x52c6f4]
mov ecx, esi
lea edx, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x4ba656
push 0
sub ecx, edx
lea edx, [ebp - 4]
push edx
push ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebx
pop esi
leave
ret
Function at 0x4bb887
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x4bba5b
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x532600]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x4bba5b
test cl, 0x48
je 0x4bb8f2
cmp byte [eax + 5], 0xa
je 0x4bb8f2
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4bb944
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x4bb92c
call fcn.004b1b35
mov dword [eax], 9
call fcn.004b1b48
mov dword [eax], esi
jmp 0x4bb93c
cmp eax, 0x6d
je 0x4bba5b
push eax
call fcn.004b1b5b
pop ecx
or eax, 0xffffffff
jmp 0x4bba5d
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x4bba56
test eax, eax
je 0x4bb96b
cmp byte [ebx], 0xa
jne 0x4bb96b
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x4bb974
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x4bba50
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x4bba40
cmp al, 0xd
je 0x4bb9a6
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x4bba32
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x4bb9c0
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x4bb9bb
add dword [ebp + 0x10], 2
jmp 0x4bba14
mov dword [ebp + 0x10], eax
jmp 0x4bba2e
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4bb9e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4bba2e
cmp dword [ebp - 0xc], 0
je 0x4bba2e
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4bba09
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x4bba14
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4bba31
cmp ebx, dword [ebp + 0xc]
jne 0x4bba19
cmp byte [ebp - 1], 0xa
jne 0x4bba19
mov byte [ebx], 0xa
jmp 0x4bba31
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004b84fa
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4bba32
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x4bb98a
jmp 0x4bba50
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x4bba50
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x4bba5d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4bd7ec
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x4bd81a
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x4bd821
cmp ebx, dword [eax + 4]
jae 0x4bd821
xor eax, eax
jmp 0x4bda11
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4bd832
xor eax, eax
inc eax
jmp 0x4bda10
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4bd848
cmp ecx, edx
jae 0x4bd98d
cmp dword [eax + 4], 0
je 0x4bd851
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4bd839
cmp dword [ebp + 8], 0
je 0x4bd873
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x4bd98d
cmp eax, esi
jae 0x4bd98d
mov eax, dword [0x5324f8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x4bd898
cmp dword [esi*4 + 0x532500], edi
je 0x4bd991
inc esi
cmp esi, eax
jl 0x4bd886
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4bda0d
cmp dword [ebp - 8], 0x1000000
jne 0x4bda0d
test byte [ebp - 0xc], 0xcc
je 0x4bd916
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x4bda0d
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x4bda0d
cmp word [eax + 0x18], 0x10b
jne 0x4bda0d
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x4bda0d
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4bd916
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4bd916
test byte [ecx + 0x27], 0x80
jne 0x4bd98d
push 1
push 0x532540
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4bd82a
mov ecx, dword [0x5324f8]
test ecx, ecx
mov edx, ecx
jle 0x4bd94a
lea eax, [ecx*4 + 0x5324fc]
cmp dword [eax], edi
je 0x4bd94a
dec edx
sub eax, 4
test edx, edx
jg 0x4bd93e
test edx, edx
jne 0x4bd97b
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4bd957
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4bd96f
lea eax, [edx*4 + 0x532500]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4bd95d
cmp ecx, 0x10
jge 0x4bd97b
inc ecx
mov dword [0x5324f8], ecx
push 0
push 0x532540
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4bd82a
xor eax, eax
jmp 0x4bda10
test esi, esi
jle 0x4bd82a
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x532540
call ebx
test eax, eax
jne 0x4bd82a
cmp dword [esi*4 + 0x532500], edi
je 0x4bd9e7
mov eax, dword [0x5324f8]
lea esi, [eax - 1]
test esi, esi
jl 0x4bd9d5
cmp dword [esi*4 + 0x532500], edi
je 0x4bd9d1
dec esi
jns 0x4bd9c5
test esi, esi
jge 0x4bd9e5
cmp eax, 0x10
jge 0x4bd9e0
inc eax
mov dword [0x5324f8], eax
lea esi, [eax - 1]
jmp 0x4bd9e7
je 0x4bd9ff
xor ecx, ecx
test esi, esi
jl 0x4bd9ff
lea eax, [ecx*4 + 0x532500]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4bd9ed
push 0
push 0x532540
call ebx
jmp 0x4bd82a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret