joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4a415a
Capabilities:
Print debug messages
Unmount volume via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa14
mov dword [ebp - 0xa10], 0
cmp dword [ebp + 8], 0xffffffff
jne 0x4a4185
push str._Inquiry_And_ReadFlashID_:_Device_handle_is_not_valid_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x4a4273
push 0
lea eax, [ebp - 0xa14]
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 - 0xa14]
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 0xa00
lea ecx, [ebp - 0xa00]
push ecx
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0xa0c]
push eax
call fcn.004a4277
add esp, 0x10
mov dword [ebp - 0xa10], eax
push 0
lea ecx, [ebp - 0xa14]
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 - 0xa14]
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 - 0xa10], 0
je 0x4a426d
cmp dword [ebp + 0x10], 0x400
ja 0x4a4255
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0xa00]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004b96d0
add esp, 0xc
jmp 0x4a426d
push 0x400
lea edx, [ebp - 0xa00]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004b96d0
add esp, 0xc
mov eax, dword [ebp - 0xa10]
mov esp, ebp
pop ebp
ret

Function at 0x4a6790
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 0x4a67f2
cmp dword [ebp - 0x8c], 0x5a
je 0x4a67f0
mov dword [ebp - 0xa4], 1
jmp 0x4a6821
cmp dword [ebp - 0x90], 5
jne 0x4a6821
cmp dword [ebp - 0x8c], 0
jne 0x4a680e
mov dword [ebp - 0x9c], 1
cmp dword [ebp - 0x8c], 1
jne 0x4a6821
mov dword [ebp - 0x98], 1
mov eax, dword [ebp - 0xa4]
mov esp, ebp
pop ebp
ret

Function at 0x4a682b
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 0x4a688d
cmp dword [ebp - 0x8c], 0x5a
je 0x4a688b
mov dword [ebp - 0xa4], 1
jmp 0x4a68bc
cmp dword [ebp - 0x90], 5
jne 0x4a68bc
cmp dword [ebp - 0x8c], 0
jne 0x4a68a9
mov dword [ebp - 0x9c], 1
cmp dword [ebp - 0x8c], 1
jne 0x4a68bc
mov dword [ebp - 0x98], 1
mov eax, dword [ebp - 0x9c]
mov esp, ebp
pop ebp
ret
Function at 0x4a6980
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push esi
push edi
cmp dword [0x53e05c], 0
je 0x4a69be
mov edi, 0x53814c
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 0x4a69e6
mov edi, 0x538178
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.004b92a0
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 0x4a6a66
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 0x4acbbb
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.004b953d
add esp, 0x10
push 0x53e070
mov ecx, dword [ebp - 4]
push ecx
call fcn.004b9290
add esp, 8
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x310]
push eax
call fcn.004b9290
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.004b953d
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 0x4acc61
xor eax, eax
jmp 0x4acd5f
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 0x4acd36
lea eax, [ebp - 0x424]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call fcn.004b9290
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.004b9c90
add esp, 8
test eax, eax
je 0x4acd07
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0x20c]
push eax
call fcn.004b9c90
add esp, 8
test eax, eax
je 0x4acd07
lea ecx, [ebp - 0x310]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.004b9290
add esp, 8
lea eax, [ebp - 0x424]
push eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.004b92a0
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 0x4acd31
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x4acd31
mov dword [ebp - 8], 1
jmp 0x4acc86
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.004b9290
add esp, 8
mov ecx, dword [ebp - 4]
push ecx
call fcn.004b9f20
add esp, 4
mov esp, ebp
pop ebp
ret
Function at 0x4bc2eb
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 0x4bc308
call fcn.004bcf95
mov dword [eax], 0x16
xor eax, eax
jmp 0x4bc371
xor ecx, ecx
push esi
mov edx, 0x8c
inc ecx
call fcn.004c2e6a
mov esi, eax
test esi, esi
je 0x4bc35c
push esi
call fcn.004bfa28
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 0x4bc33a
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x4bc256
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x4bc370
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.004b9a0d
test ebx, ebx
pop ecx
je 0x4bc36e
push ebx
call fcn.004bcfbb
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4c0336
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 0x4c0354
xor eax, eax
jmp 0x4c04c2
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 + 0x540920]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x4c0387
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.004c8ee2
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x4c0459
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edi
jbe 0x4c0491
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 0x4c03e2
mov edx, dword [ebp - 0xc]
inc dword [ebp - 0xc]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4c03d3
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 0x4c03b6
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 0x4c0422
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x10], eax
cmp eax, edi
jl 0x4c042b
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x4c03a7
jmp 0x4c042d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
xor edi, edi
mov eax, dword [ebp - 0x10]
cmp eax, edi
jne 0x4c04bd
cmp dword [ebp - 4], edi
je 0x4c0491
push 5
pop esi
cmp dword [ebp - 4], esi
jne 0x4c0486
call fcn.004bcf95
mov dword [eax], 9
call fcn.004bcfa8
mov dword [eax], esi
jmp 0x4c04b8
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 0x4c047b
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], eax
jmp 0x4c042d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x4c042d
push dword [ebp - 4]
call fcn.004bcfbb
pop ecx
jmp 0x4c04b8
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4c04a6
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x4c04a6
xor eax, eax
jmp 0x4c04c0
call fcn.004bcf95
mov dword [eax], 0x1c
call fcn.004bcfa8
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x4c04c0
sub eax, dword [ebp - 0x14]
pop esi
pop ebx
pop edi
leave
ret
Function at 0x4c588e
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.004b9690
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4c5929
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 [0x54011c]
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 0x4c5929
cmp eax, 1
je 0x4c594a
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 0x4c5929
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4c58f6
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4c5925
xor eax, eax
inc eax
jmp 0x4c5969
cmp edi, eax
jae 0x4c592d
xor eax, eax
jmp 0x4c5969
cmp eax, esi
jae 0x4c5934
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 [0x54011c]
jmp 0x4c594d
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 0x4c5971
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 + 0x53a980]
je 0x4c5989
inc eax
cmp eax, 0x12
jb 0x4c597a
push esi
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x53a980]
mov dword [ebp + 8], esi
jne 0x4c5acf
mov eax, dword [0x540168]
cmp eax, 1
push ebx
je 0x4c5a9f
test eax, eax
jne 0x4c59be
cmp dword [0x539fb4], 1
je 0x4c5a9f
cmp ecx, 0xfc
je 0x4c5ace
push edi
push 6
pop ecx
mov esi, str.Runtime_Error__n_nProgram:
mov edi, 0x5403a0
rep movsd dword es:[edi], dword [esi]
push 0x104
mov ebx, 0x5403ba
push ebx
movsw word es:[edi], word [esi]
push 0
mov byte [0x5404be], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4c5a0c
push 5
pop ecx
mov esi, str._program_name_unknown_
mov edi, 0x5403ba
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 0x4c5a11
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x4c5a44
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c5a25
sub eax, edx
push 3
lea eax, [eax + 0x54037f]
push 0x50672c
push eax
call fcn.004ca0e0
add esp, 0xc
mov edx, 0x5403a0
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4c5a4c
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x53a984]
mov esi, 0x506728
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 0x4c5a67
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4c5a73
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.004cbc4c
add esp, 0xc
pop edi
jmp 0x4c5ace
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x4c5ace
mov esi, dword [esi + 0x53a984]
mov ecx, esi
lea edx, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x4c5ab6
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 0x4c6ce7
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 0x4c6ebb
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x540920]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x4c6ebb
test cl, 0x48
je 0x4c6d52
cmp byte [eax + 5], 0xa
je 0x4c6d52
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 0x4c6da4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x4c6d8c
call fcn.004bcf95
mov dword [eax], 9
call fcn.004bcfa8
mov dword [eax], esi
jmp 0x4c6d9c
cmp eax, 0x6d
je 0x4c6ebb
push eax
call fcn.004bcfbb
pop ecx
or eax, 0xffffffff
jmp 0x4c6ebd
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x4c6eb6
test eax, eax
je 0x4c6dcb
cmp byte [ebx], 0xa
jne 0x4c6dcb
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x4c6dd4
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 0x4c6eb0
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x4c6ea0
cmp al, 0xd
je 0x4c6e06
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x4c6e92
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x4c6e20
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x4c6e1b
add dword [ebp + 0x10], 2
jmp 0x4c6e74
mov dword [ebp + 0x10], eax
jmp 0x4c6e8e
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 0x4c6e48
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4c6e8e
cmp dword [ebp - 0xc], 0
je 0x4c6e8e
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4c6e69
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x4c6e74
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4c6e91
cmp ebx, dword [ebp + 0xc]
jne 0x4c6e79
cmp byte [ebp - 1], 0xa
jne 0x4c6e79
mov byte [ebx], 0xa
jmp 0x4c6e91
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004c395a
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4c6e92
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x4c6dea
jmp 0x4c6eb0
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x4c6eb0
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 0x4c6ebd
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4c8c4c
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 0x4c8c7a
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 0x4c8c81
cmp ebx, dword [eax + 4]
jae 0x4c8c81
xor eax, eax
jmp 0x4c8e71
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4c8c92
xor eax, eax
inc eax
jmp 0x4c8e70
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4c8ca8
cmp ecx, edx
jae 0x4c8ded
cmp dword [eax + 4], 0
je 0x4c8cb1
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4c8c99
cmp dword [ebp + 8], 0
je 0x4c8cd3
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x4c8ded
cmp eax, esi
jae 0x4c8ded
mov eax, dword [0x540800]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x4c8cf8
cmp dword [esi*4 + 0x540808], edi
je 0x4c8df1
inc esi
cmp esi, eax
jl 0x4c8ce6
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4c8e6d
cmp dword [ebp - 8], 0x1000000
jne 0x4c8e6d
test byte [ebp - 0xc], 0xcc
je 0x4c8d76
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x4c8e6d
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x4c8e6d
cmp word [eax + 0x18], 0x10b
jne 0x4c8e6d
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x4c8e6d
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4c8d76
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4c8d76
test byte [ecx + 0x27], 0x80
jne 0x4c8ded
push 1
push 0x540848
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4c8c8a
mov ecx, dword [0x540800]
test ecx, ecx
mov edx, ecx
jle 0x4c8daa
lea eax, [ecx*4 + 0x540804]
cmp dword [eax], edi
je 0x4c8daa
dec edx
sub eax, 4
test edx, edx
jg 0x4c8d9e
test edx, edx
jne 0x4c8ddb
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4c8db7
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4c8dcf
lea eax, [edx*4 + 0x540808]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4c8dbd
cmp ecx, 0x10
jge 0x4c8ddb
inc ecx
mov dword [0x540800], ecx
push 0
push 0x540848
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4c8c8a
xor eax, eax
jmp 0x4c8e70
test esi, esi
jle 0x4c8c8a
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x540848
call ebx
test eax, eax
jne 0x4c8c8a
cmp dword [esi*4 + 0x540808], edi
je 0x4c8e47
mov eax, dword [0x540800]
lea esi, [eax - 1]
test esi, esi
jl 0x4c8e35
cmp dword [esi*4 + 0x540808], edi
je 0x4c8e31
dec esi
jns 0x4c8e25
test esi, esi
jge 0x4c8e45
cmp eax, 0x10
jge 0x4c8e40
inc eax
mov dword [0x540800], eax
lea esi, [eax - 1]
jmp 0x4c8e47
je 0x4c8e5f
xor ecx, ecx
test esi, esi
jl 0x4c8e5f
lea eax, [ecx*4 + 0x540808]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4c8e4d
push 0
push 0x540848
call ebx
jmp 0x4c8c8a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4cbc4c
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x5408a0], ebx
push esi
push edi
jne 0x4cbccc
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4cbd07
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x507b5c
push edi
call esi
test eax, eax
mov dword [0x5408a0], eax
je 0x4cbd07
push 0x507b4c
push edi
call esi
push 0x507b38
push edi
mov dword [0x5408a4], eax
call esi
cmp dword [0x54011c], 2
mov dword [0x5408a8], eax
jne 0x4cbccc
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x5408b0], eax
je 0x4cbccc
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x5408ac], eax
mov eax, dword [0x5408ac]
test eax, eax
je 0x4cbd11
call eax
test eax, eax
je 0x4cbcf8
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x5408b0]
test eax, eax
je 0x4cbcf8
test byte [ebp - 8], 1
jne 0x4cbd11
cmp dword [0x540128], 4
jb 0x4cbd0b
or byte [ebp + 0x12], 0x20
jmp 0x4cbd30
xor eax, eax
jmp 0x4cbd40
or byte [ebp + 0x12], 4
jmp 0x4cbd30
mov eax, dword [0x5408a4]
test eax, eax
je 0x4cbd30
call eax
mov ebx, eax
test ebx, ebx
je 0x4cbd30
mov eax, dword [0x5408a8]
test eax, eax
je 0x4cbd30
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x5408a0]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4cc566
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
call fcn.004c395a
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x4cc6ab
push 2
push esi
push dword [ebp + 8]
call fcn.004c395a
add esp, 0xc
cmp eax, ebx
je 0x4cc6ab
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x4cc64e
mov ebx, 0x1000
push ebx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [ebp - 4], eax
jne 0x4cc5df
call fcn.004bcf95
mov dword [eax], 0xc
or esi, 0xffffffff
jmp 0x4cc696
push 0x8000
push dword [ebp + 8]
call fcn.004cd596
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp edi, ebx
mov eax, ebx
jge 0x4cc5f9
mov eax, edi
push eax
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.004c0336
add esp, 0xc
cmp eax, 0xffffffff
je 0x4cc615
sub edi, eax
test edi, edi
jg 0x4cc5f1
jmp 0x4cc62d
call fcn.004bcfa8
cmp dword [eax], 5
jne 0x4cc62a
call fcn.004bcf95
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.004cd596
pop ecx
pop ecx
push dword [ebp - 4]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4cc696
jge 0x4cc696
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004c395a
push dword [ebp + 8]
call fcn.004bccc9
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x4cc696
call fcn.004bcf95
mov dword [eax], 0xd
call fcn.004bcfa8
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.004c395a
add esp, 0xc
mov eax, esi
pop edi
jmp 0x4cc6ad
mov eax, ebx
pop esi
pop ebx
leave
ret