joyce8/EMBER2024-capa huggingface dataset:
Function at 0x477890
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4f2243
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x420
mov eax, dword [0x53ffd0]
xor eax, dword [esp + 0x42c]
push ebx
push ebp
push esi
mov dword [esp + 0x428], eax
push edi
mov dword [esp + 0x10], ecx
lea eax, [esp + 0x224]
push eax
xor esi, esi
push 0x104
mov dword [esp + 0x440], esi
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
test eax, eax
je 0x47793f
lea eax, [esp + 0x1c]
push eax
push esi
push 0x50a6e8
lea ecx, [esp + 0x230]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetTempFileNameW]
test eax, eax
jne 0x477927
mov eax, dword [esp + 0x44c]
add eax, 0xfffffff0
mov dword [esp + 0x438], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x477961
lea eax, [esp + 0x1c]
push 0x50a324
push eax
call fcn.004b81f0
mov ebp, eax
add esp, 8
cmp ebp, esi
jne 0x477972
mov eax, dword [esp + 0x44c]
add eax, 0xfffffff0
mov dword [esp + 0x438], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47796b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor al, al
jmp 0x477a4e
mov edi, dword [esp + 0x444]
mov ebx, dword [esp + 0x440]
lea eax, [edi - 0x400]
cmp eax, esi
jl 0x4779b4
lea ebx, [ebx]
push ebp
push 1
lea eax, [esi + ebx]
push 0x400
push eax
call fcn.004b92e8
add esi, 0x400
lea eax, [edi - 0x400]
add esp, 0x10
cmp esi, eax
jle 0x477990
push ebp
push 1
sub edi, esi
push edi
add esi, ebx
push esi
call fcn.004b92e8
push ebp
call fcn.004b800e
mov esi, dword [esp + 0x460]
add esp, 0x10
add esi, 0xfffffff0
mov dword [esp + 0x1c], esp
mov edi, esp
push esi
call fcn.00406120
add eax, 0x10
add esp, 4
mov dword [edi], eax
mov ecx, dword [esp + 0x44c]
push ecx
push ecx
lea edx, [esp + 0x28]
mov ecx, esp
mov dword [esp + 0x20], esp
push edx
mov byte [esp + 0x448], 1
call fcn.00403260
mov ecx, dword [esp + 0x1c]
mov byte [esp + 0x444], 0
call fcn.004775d0
mov bl, al
lea eax, [esp + 0x1c]
push eax
call fcn.004b8b02
add esp, 4
mov dword [esp + 0x438], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x477a4c
mov ecx, dword [esi]
mov eax, dword [ecx]
push esi
call dword [eax + 4]
mov al, bl
mov ecx, dword [esp + 0x430]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x42c]
xor ecx, dword [esp + 0x43c]
call fcn.004b8f56
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x42c
ret 0x10
Function at 0x49c4a0
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, ecx
lea ecx, [eax + esi]
xor eax, eax
cmp esi, edx
jae 0x49c4cc
sub edx, esi
mov esi, edx
xor edx, edx
mov dl, byte [ecx]
xor edx, eax
and edx, 0xff
mov edx, dword [edx*4 + 0x53d128]
shr eax, 8
xor eax, edx
inc ecx
dec esi
jne 0x49c4b0
pop esi
ret
Function at 0x49ca70
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x4f3aa0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
xor eax, eax
push edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
call fcn.004d4318
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea edi, [eax + 0x10]
mov dword [esp + 0x10], edi
mov ebp, dword [esp + 0x30]
mov eax, dword [ebp - 4]
mov esi, dword [ebp - 0xc]
mov ecx, 1
sub ecx, eax
mov eax, dword [ebp - 8]
sub eax, esi
xor bl, bl
or eax, ecx
mov byte [esp + 0x24], 1
jge 0x49cad8
push esi
lea ecx, [esp + 0x34]
call fcn.00402a90
mov ebp, dword [esp + 0x30]
push ebp
call fcn.004b85b8
mov dword [ebp - 0xc], esi
mov word [ebp + esi*2], 0
mov eax, dword [ebp - 0xc]
xor edx, edx
add esp, 4
test eax, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
jle 0x49cb8a
mov ax, word [ebp + edx*2]
cmp ax, 0x30
jb 0x49cb24
cmp ax, 0x39
ja 0x49cb24
mov ecx, edx
and ecx, 1
jne 0x49cb34
and bl, 0xf
shl al, 4
or al, bl
mov bl, al
jmp 0x49cb3a
cmp ax, 0x41
jb 0x49cb8a
cmp ax, 0x46
ja 0x49cb8a
sub al, 7
jmp 0x49cb11
xor al, bl
and al, 0xf
xor bl, al
test ecx, ecx
je 0x49cb79
mov eax, dword [edi - 4]
mov ebp, dword [edi - 0xc]
mov ecx, 1
sub ecx, eax
mov eax, dword [edi - 8]
lea esi, [ebp + 1]
sub eax, esi
or eax, ecx
jge 0x49cb69
push esi
lea ecx, [esp + 0x14]
call fcn.00439160
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov byte [edi + ebp], bl
mov ebp, dword [esp + 0x30]
mov dword [edi - 0xc], esi
mov byte [esi + edi], 0
xor bl, bl
mov eax, dword [esp + 0x18]
inc edx
cmp edx, eax
mov dword [esp + 0x14], edx
jl 0x49cb00
mov ecx, dword [edi - 0x10]
mov eax, dword [ecx]
lea ebx, [edi - 0x10]
call dword [eax + 0x10]
mov edx, dword [ebx + 0xc]
test edx, edx
lea ecx, [ebx + 0xc]
jl 0x49cbb0
cmp eax, dword [ebx]
jne 0x49cbb0
mov eax, ebx
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x49cbe3
mov ecx, dword [ebx + 4]
mov edx, dword [eax]
push 1
push ecx
mov ecx, eax
call dword [edx]
test eax, eax
jne 0x49cbc5
jmp fcn.00402690
mov edx, dword [ebx + 4]
mov dword [eax + 4], edx
mov ecx, dword [ebx + 4]
inc ecx
mov edx, ecx
shr ecx, 2
lea esi, [ebx + 0x10]
lea edi, [eax + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x2c]
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0x24], 0
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x49cc08
mov ecx, dword [ebx]
mov edx, dword [ecx]
push ebx
call dword [edx + 4]
lea eax, [ebp - 0x10]
mov dword [esp + 0x24], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x49cc2a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x1c]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret
Function at 0x49d843
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x3c
mov eax, dword [0x53ffd0]
xor eax, dword [esp + 0x3c]
push ebx
mov ebx, dword [sym.imp.KERNEL32.DLL_CloseHandle]
push esi
mov esi, ecx
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0x1c]
cmp eax, 0xffffffff
push edi
je 0x49d85d
push eax
call ebx
mov dword [esi + 0x1c], 0xffffffff
mov eax, dword [esp + 0x4c]
push eax
lea ecx, [esp + 0x50]
call fcn.00403260
mov eax, dword [eax]
xor edi, edi
push edi
push 0x8000080
push 3
push edi
push 1
push DirectSoundCreate
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [esi + 0x1c], eax
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x49d8a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esi + 0x1c]
cmp eax, 0xffffffff
je 0x49d95e
push edi
lea ecx, [esp + 0x10]
push ecx
push 0x2c
lea edx, [esp + 0x24]
push edx
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x49d951
cmp dword [esp + 0x18], 0x46464952
jne 0x49d951
cmp dword [esp + 0x20], 0x41584443
jne 0x49d951
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x1c]
add eax, 0x24
cmp ecx, eax
jne 0x49d951
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x14]
push ecx
push edx
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov ecx, dword [esp + 0x14]
push edi
mov dword [esp + 0x14], eax
sub eax, 0x2c
push 0x930
sbb ecx, edi
push ecx
push eax
call fcn.004b78f0
imul eax, eax, 0x914
cdq
mov ecx, esi
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], edx
call fcn.0049cc40
test al, al
mov dword [esi + 0x24], edi
mov dword [esi + 0x20], edi
jne 0x49d94d
mov edx, dword [esi + 0x1c]
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
push edx
jmp 0x49d955
mov al, 1
jmp 0x49d960
mov eax, dword [esi + 0x1c]
push eax
call ebx
mov dword [esi + 0x1c], 0xffffffff
xor al, al
mov ecx, dword [esp + 0x44]
xor ecx, dword [esp + 0x48]
pop edi
pop esi
pop ebx
call fcn.004b8f56
add esp, 0x3c
ret 4
Function at 0x4a9b00
Capabilities:
Create thread

Disassembly:
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 0x80]
test eax, eax
jne 0x4a9b50
mov eax, dword [esi + 0x7c]
push eax
call dword [sym.imp.KERNEL32.DLL_ResetEvent]
lea ecx, [esp + 4]
push ecx
push 0
push esi
push 0x4a9930
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
test eax, eax
mov dword [esi + 0x80], eax
jne 0x4a9b50
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jle 0x4a9b52
and eax, 0xffff
or eax, 0x80070000
pop esi
pop ecx
ret
xor eax, eax
pop esi
pop ecx
ret
Function at 0x4ae389
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
je 0x4ae3dc
call fcn.004e69f3
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceW]
cmp eax, ebx
je 0x4ae3dc
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x4ae3d2
xor eax, eax
jmp 0x4ae4f1
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0xc], 1
je 0x4ae40b
mov eax, dword [edi]
push ebx
push dword [ebp - 4]
mov ecx, edi
push dword [ebp + 8]
call dword [eax + 0x1c]
cmp dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
je 0x4ae40b
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_FreeResource]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x48]
test eax, eax
je 0x4ae4ee
mov edi, dword [eax + 0x40]
and dword [ebp + 0x10], 0
xor eax, eax
cmp edi, eax
mov dword [ebp + 0xc], edi
mov dword [ebp - 8], edi
je 0x4ae43a
mov ecx, dword [edi]
mov dword [ebp + 0xc], ecx
mov ecx, dword [edi + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp + 0x10], ecx
cmp dword [ebx + 8], eax
mov dword [ebp - 4], eax
jbe 0x4ae4ee
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4ae478
mov ecx, dword [ecx + 4]
mov edx, dword [ebx + 0xc]
mov ecx, dword [ecx + 0x28]
cmp ecx, dword [edx + eax*8]
jne 0x4ae478
test edi, edi
mov dword [ebp - 8], edi
je 0x4ae472
mov eax, dword [edi]
mov dword [ebp + 0xc], eax
mov eax, dword [edi + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
jmp 0x4ae4de
and dword [ebp + 0x10], 0
jmp 0x4ae4de
mov ecx, dword [ebx + 0xc]
shl eax, 3
cmp dword [eax + ecx], 0
mov dword [ebp - 0x10], eax
je 0x4ae4de
push 0xc
call fcn.004d2f6a
mov esi, eax
test esi, esi
pop ecx
je 0x4ae4bd
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1c]
mov eax, dword [ebx + 0xc]
mov edx, dword [ebp - 0x10]
add eax, edx
push dword [eax]
mov edi, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_GetDlgItem]
and dword [esi + 4], 0
mov dword [esi + 8], edi
mov edi, dword [ebp + 0xc]
mov dword [esi], eax
jmp 0x4ae4bf
xor esi, esi
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x48]
add ecx, 0x3c
cmp dword [ebp - 8], 0
push esi
je 0x4ae4d9
push dword [ebp - 8]
call fcn.004ceb79
jmp 0x4ae4de
call fcn.004ceb50
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [ebx + 8]
mov dword [ebp - 4], eax
jb 0x4ae446
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x4b6482
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x5141b0
call fcn.004bbb28
mov edi, 0x94
mov eax, edi
call fcn.004b6f80
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x546ef0], ecx
mov eax, dword [esi + 4]
mov dword [0x546efc], eax
mov edx, dword [esi + 8]
mov dword [0x546f00], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x546ef4], esi
cmp ecx, 2
je 0x4b64e2
or esi, 0x8000
mov dword [0x546ef4], esi
shl eax, 8
add eax, edx
mov dword [0x546ef8], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4b651d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4b651d
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4b6535
cmp eax, 0x20b
je 0x4b6522
mov dword [ebp - 0x1c], esi
jmp 0x4b6549
cmp dword [ecx + 0x84], 0xe
jbe 0x4b651d
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4b6543
cmp dword [ecx + 0x74], 0xe
jbe 0x4b651d
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.004bcaf0
pop ecx
test eax, eax
jne 0x4b655d
push 0x1c
call fcn.004b645e
pop ecx
call fcn.004bca67
test eax, eax
jne 0x4b656e
push 0x10
call fcn.004b645e
pop ecx
call fcn.004bc950
mov dword [ebp - 4], esi
call fcn.004bc752
test eax, eax
jge 0x4b6587
push 0x1b
call fcn.004b6439
pop ecx
call fcn.004bc6b1
mov dword [0x5489b0], eax
call fcn.004bc547
mov dword [0x546edc], eax
call fcn.004bc4b1
test eax, eax
jge 0x4b65ac
push 8
call fcn.004b6439
pop ecx
call fcn.004bc27e
test eax, eax
jge 0x4b65bd
push 9
call fcn.004b6439
pop ecx
call fcn.004b8b9c
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x4b65d0
push eax
call fcn.004b6439
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.DLL_GetStartupInfoW]
call fcn.004bc22a
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x4b65f1
movzx eax, word [ebp - 0x34]
jmp 0x4b65f4
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.004cc2b0
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4b6612
push edi
call fcn.004b8cd4
call fcn.004b8cf6
jmp 0x4b6644
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.004bbb63
ret
Function at 0x4b8c01
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 8
call fcn.004bcc73
xor esi, esi
inc esi
cmp dword [0x546f30], esi
pop ecx
jne 0x4b8c29
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x546f2c], esi
mov byte [0x546f28], al
jne 0x4b8c8f
mov ecx, dword [0x5489a8]
test ecx, ecx
je 0x4b8c70
mov eax, dword [0x5489a4]
sub eax, 4
cmp eax, ecx
jmp 0x4b8c69
mov eax, dword [eax]
test eax, eax
je 0x4b8c5b
call eax
mov eax, dword [0x5489a4]
sub eax, 4
cmp eax, dword [0x5489a8]
mov dword [0x5489a4], eax
jae 0x4b8c53
mov eax, 0x5310b4
mov esi, 0x5310bc
cmp eax, esi
mov edi, eax
jae 0x4b8c8f
mov eax, dword [edi]
test eax, eax
je 0x4b8c88
call eax
add edi, 4
cmp edi, esi
jb 0x4b8c80
mov eax, 0x5310c0
mov esi, 0x5310c8
cmp eax, esi
mov edi, eax
jae 0x4b8cae
mov eax, dword [edi]
test eax, eax
je 0x4b8ca7
call eax
add edi, 4
cmp edi, esi
jb 0x4b8c9f
cmp dword [ebp + 0x10], 0
pop edi
pop esi
je 0x4b8cbf
push 8
call fcn.004bcbdf
jmp 0x4b8cd1
push dword [ebp + 8]
mov dword [0x546f30], 1
call fcn.004b8b5a
pop ecx
pop ebp
ret
Function at 0x4b9c6f
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 0x4b9e35
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x5488a0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x4b9e35
test cl, 0x48
je 0x4b9cd5
mov al, byte [eax + 5]
cmp al, 0xa
je 0x4b9cd5
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 0x4b9d27
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x4b9d0f
call fcn.004bb132
mov dword [eax], 9
call fcn.004bb13b
mov dword [eax], esi
jmp 0x4b9d1f
cmp eax, 0x6d
je 0x4b9e35
push eax
call fcn.004bb144
pop ecx
or eax, 0xffffffff
jmp 0x4b9e37
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x4b9e30
test edx, edx
je 0x4b9d4a
cmp byte [ebx], 0xa
jne 0x4b9d4a
or al, 4
jmp 0x4b9d4c
and al, 0xfb
mov byte [ecx], al
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 0x4b9e2a
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x4b9e1a
cmp al, 0xd
je 0x4b9d80
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x4b9e0c
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x4b9d9a
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x4b9d95
add dword [ebp + 0x10], 2
jmp 0x4b9dee
mov dword [ebp + 0x10], eax
jmp 0x4b9e08
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 0x4b9dc2
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jne 0x4b9e08
cmp dword [ebp - 0xc], 0
je 0x4b9e08
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4b9de3
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x4b9dee
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4b9e0b
cmp ebx, dword [ebp + 0xc]
jne 0x4b9df3
cmp byte [ebp - 1], 0xa
jne 0x4b9df3
mov byte [ebx], 0xa
jmp 0x4b9e0b
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004c3d08
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4b9e0c
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x4b9d64
jmp 0x4b9e2a
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x4b9e2a
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x4b9e37
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4bbf16
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x53ffd0]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x540148]
je 0x4bbf43
inc eax
cmp eax, 0x12
jb 0x4bbf34
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x540148]
jne 0x4bc077
mov eax, dword [0x546ee0]
cmp eax, 1
je 0x4bc052
cmp eax, edx
jne 0x4bbf73
cmp dword [0x53fecc], 1
je 0x4bc052
cmp ecx, 0xfc
je 0x4bc077
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x4bbfac
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.004c3c10
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.004bace0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4bbfee
lea eax, [ebp - 0x10c]
push eax
call fcn.004bace0
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x514808
push edi
call fcn.004c61a0
add esp, 0x10
push edi
call fcn.004bace0
push dword [esi + 0x54014c]
mov ebx, eax
call fcn.004bace0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004b6f80
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.004c3c10
push edi
push ebx
call fcn.004c3c20
push 0x5147e8
push ebx
call fcn.004c3c20
push dword [esi + 0x54014c]
push ebx
call fcn.004c3c20
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004c6099
add esp, 0x2c
jmp 0x4bc077
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x54014c]
push dword [esi]
call fcn.004bace0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.DLL_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
lea esp, [ebp - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.004b8f56
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4bc547
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x547144]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.DLL_GetEnvironmentStringsW]
push esi
push edi
xor ebx, ebx
xor esi, esi
xor edi, edi
cmp eax, ebx
jne 0x4bc590
call ebp
mov esi, eax
cmp esi, ebx
je 0x4bc576
mov dword [0x547144], 1
jmp 0x4bc595
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x78
jne 0x4bc58b
push 2
pop eax
mov dword [0x547144], eax
jmp 0x4bc590
mov eax, dword [0x547144]
cmp eax, 1
jne 0x4bc5ed
cmp esi, ebx
jne 0x4bc5a8
call ebp
mov esi, eax
cmp esi, ebx
jne 0x4bc5a8
xor eax, eax
jmp 0x4bc694
cmp word [esi], bx
mov eax, esi
je 0x4bc5bd
inc eax
inc eax
cmp word [eax], bx
jne 0x4bc5af
inc eax
inc eax
cmp word [eax], bx
jne 0x4bc5af
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.004b6f64
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x4bc5e0
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsW]
mov eax, edi
jmp 0x4bc694
push ebp
push esi
push edi
call fcn.004ba8d0
add esp, 0xc
jmp 0x4bc5d2
cmp eax, 2
je 0x4bc5f6
cmp eax, ebx
jne 0x4bc5a1
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x4bc5a1
cmp byte [ebp], bl
mov esi, ebp
je 0x4bc62c
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
cmp eax, ebx
je 0x4bc5a1
push esi
add edi, eax
call fcn.004bace0
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x4bc609
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.004b6f64
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x4bc6a5
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x4bc686
mov ecx, dword [esp + 0x14]
mov eax, esi
sub eax, dword [esp + 0x10]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
test eax, eax
je 0x4bc69b
push edi
call fcn.004bace0
push esi
lea edi, [edi + eax + 1]
call fcn.004b6b5b
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x4bc64c
push ebp
mov word [esi], bx
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
push dword [esp + 0x10]
call fcn.004b6aea
pop ecx
push ebp
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsA]
jmp 0x4bc5a1