joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4017f0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401809
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40181d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40183e
cmp esi, eax
jae 0x401817
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401830
cmp esi, eax
jae 0x401817
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x402790
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push ecx
mov eax, dword [ecx + 0x1c]
push eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x402884
push ebx
push ebp
push esi
push edi
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov ebx, dword [esp + 0x1c]
xor eax, eax
xor ecx, ecx
test ebx, ebx
jle 0x4027d3
lea esp, [esp]
mov edx, dword [esp + 0x18]
mov edx, dword [edx + eax*4]
mov edx, dword [edx - 0xc]
inc eax
cmp eax, ebx
lea ecx, [ecx + edx + 2]
jl 0x4027c0
push ecx
push 0x2000
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
push edi
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebp, eax
mov eax, dword [esp + 0x18]
mov edx, dword [eax]
mov esi, ebp
mov cl, byte [edx]
inc edx
mov byte [esi], cl
inc esi
test cl, cl
jne 0x4027f6
mov eax, 1
cmp ebx, eax
jle 0x40286a
lea esp, [esp]
mov edi, ebp
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402813
mov cx, word [0x441cb0]
mov word [edi], cx
mov dl, byte [0x441cb2]
mov ecx, dword [esp + 0x18]
mov byte [edi + 2], dl
mov ecx, dword [ecx + eax*4]
mov edx, ecx
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x402837
sub ecx, edx
mov edi, ebp
mov esi, edx
mov edx, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402847
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
inc eax
cmp eax, ecx
jl 0x402810
mov edi, dword [esp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
call dword [sym.imp.USER32.dll_CloseClipboard]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
Function at 0x403d00
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x43eb60
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call fcn.00428480
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x30]
xor eax, eax
xor ebx, ebx
cmp ecx, eax
mov dword [esp + 0x20], eax
je 0x403d58
mov edi, dword [esp + 0x28]
mov ecx, dword [edi + 8]
mov esi, dword [esp + 0x2c]
mov word [edi + 4], ax
mov dword [ecx + 4], eax
jmp 0x403e6d
mov edx, dword [esp + 0x2c]
push edx
lea eax, [esp + 0x18]
push eax
mov ecx, ebp
call fcn.00421fc6
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x24], 1
call fcn.00403870
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x20], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403d9b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov edi, dword [esp + 0x28]
mov eax, dword [edi + 8]
test eax, eax
je 0x403e53
inc word [edi + 4]
movzx esi, word [edi + 4]
mov ebx, dword [esp + 0x10]
shl esi, 4
add esi, eax
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403dc0
mov ecx, dword [esp + 0x2c]
sub eax, edx
movzx edx, ax
inc edx
push edx
mov word [esi + 2], ax
mov dword [esi + 4], ecx
call fcn.00427c18
add esp, 4
test eax, eax
mov dword [esi + 0xc], eax
jne 0x403e21
lea eax, [ebx - 0x10]
mov dword [esp + 0x20], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403e0a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret 0xc
mov ecx, ebx
sub eax, ebx
mov dl, byte [ecx]
mov byte [eax + ecx], dl
inc ecx
test dl, dl
jne 0x403e25
mov eax, dword [esp + 0x2c]
push 8
push eax
mov ecx, ebp
call fcn.00421d11
mov dword [esi + 8], eax
mov bx, word [edi + 4]
mov edx, dword [edi + 8]
movzx ecx, bx
shl ecx, 4
mov word [ecx + edx], 0
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebp + 0x1c]
push eax
push 4
push 0x110a
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov esi, eax
xor eax, eax
cmp esi, eax
je 0x403eab
movzx ebx, bx
shl ebx, 4
mov edx, dword [edi + 8]
inc word [ebx + edx]
push 0
push esi
lea eax, [ebx + edx]
push edi
mov ecx, ebp
call fcn.00403d00
cmp dword [esp + 0x30], 2
je 0x403eab
mov eax, dword [ebp + 0x1c]
push esi
push 1
push 0x110a
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov esi, eax
test esi, esi
jne 0x403e77
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x20], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403ed1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret 0xc
Function at 0x4056e0
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
mov eax, dword [ecx + 0x1c]
push eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x405733
push edi
push 1
call dword [sym.imp.USER32.dll_GetClipboardData]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
jne 0x405708
xor ecx, ecx
jmp 0x40571a
mov ecx, eax
push esi
lea esi, [ecx + 1]
mov edi, edi
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x405710
sub ecx, esi
pop esi
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00401510
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call dword [sym.imp.USER32.dll_CloseClipboard]
pop edi
ret 4

Function at 0x406f40
Capabilities:
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x43edd0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
mov dword [esp], ecx
lea ecx, [esp + 4]
call fcn.0040aac9
test byte [0x454490], 1
mov dword [esp + 0x24], 0
jne 0x406f9d
or dword [0x454490], 1
call fcn.00428480
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
push 0x440130
mov dword [0x45448c], eax
call fcn.00414ad6
add esp, 4
mov eax, dword [esp + 0x2c]
push 0
push eax
lea ecx, [esp + 0xc]
call fcn.0040ab5c
test eax, eax
je 0x4070d4
push ebx
mov ebx, dword [esp + 0x34]
push ebp
push esi
push edi
lea ecx, [ecx]
lea ecx, [esp + 0x14]
call fcn.0040a8aa
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x44], eax
call fcn.0040ace5
mov ecx, dword [eax]
mov esi, dword [0x45448c]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
mov byte [esp + 0x34], 1
je 0x40703b
mov edx, dword [esi + 0xc]
test edx, edx
lea edi, [esi + 0xc]
jl 0x40702c
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40702c
push eax
call fcn.00402270
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x407021
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
add ebp, 0x10
mov dword [0x45448c], ebp
jmp 0x40703b
mov eax, dword [ecx - 0xc]
push eax
push ecx
mov ecx, 0x45448c
call fcn.00401510
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
mov byte [esp + 0x34], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40705e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
push 0x10
lea ecx, [esp + 0x18]
call dword [eax + 0x38]
test eax, eax
je 0x4070c4
lea ecx, [esp + 0x14]
call fcn.0040aa90
test eax, eax
jne 0x4070c4
mov edx, dword [esp + 0x14]
push 2
lea ecx, [esp + 0x18]
call dword [edx + 0x38]
test eax, eax
jne 0x4070c4
push 0x45448c
mov ecx, ebx
call fcn.00406360
mov eax, dword [0x45448c]
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push eax
call esi
mov ecx, dword [esp + 0x10]
push 0
push ebx
push 0
call fcn.00406f40
mov eax, dword [esp + 0x44]
test eax, eax
jne 0x4070c4
push 0x4420b0
call esi
mov eax, dword [esp + 0x40]
test eax, eax
jne 0x406fc0
pop edi
pop esi
pop ebp
pop ebx
lea ecx, [esp + 4]
mov dword [esp + 0x24], 0xffffffff
call fcn.0040aaed
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 0xc
Function at 0x408806
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x43eec8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
mov esi, ecx
push edi
mov dword [esp + 8], esi
call fcn.0042d361
lea ecx, [esi + 0x50]
mov dword [esp + 0x14], 0
mov dword [esi], 0x442608
call fcn.004094b0
call fcn.00428480
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea edi, [esi + 0x62]
push edi
add eax, 0x10
push 0x104
mov dword [esi + 0x5c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
dec edi
jmp 0x408850
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x408850
mov eax, dword [str.Examples]
mov dword [edi], eax
mov ecx, dword [0x442600]
mov dword [edi + 4], ecx
mov dx, word [0x442604]
mov ecx, dword [esp + 0xc]
mov word [edi + 8], dx
mov word [esi + 0x60], 0x2c
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x40b2b1
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 esi, ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
je 0x40b304
call fcn.0043a0f4
mov edi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, ebx
je 0x40b304
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x40b2fa
xor eax, eax
jmp 0x40b41d
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], ebx
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xc], 1
je 0x40b334
mov eax, dword [esi]
push edi
push dword [ebp - 4]
mov ecx, esi
push ebx
call dword [eax + 0x1c]
cmp dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
je 0x40b334
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x40b41a
mov ecx, dword [eax + 0x40]
and dword [ebp + 0xc], 0
test ecx, ecx
mov dword [ebp + 8], ecx
mov dword [ebp - 8], ecx
je 0x40b361
lea ecx, [eax + 0x3c]
lea eax, [ebp + 8]
push eax
call fcn.0040b9ea
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
xor eax, eax
cmp dword [edi + 8], eax
mov dword [ebp - 4], eax
jbe 0x40b41a
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x40b3aa
mov ecx, dword [ecx + 4]
mov edx, dword [edi + 0xc]
mov ecx, dword [ecx + 0x28]
cmp ecx, dword [edx + eax*8]
jne 0x40b3aa
mov eax, dword [ebp + 8]
test eax, eax
mov dword [ebp - 8], eax
je 0x40b3a4
mov ecx, dword [ebx + 0x48]
lea eax, [ebp + 8]
add ecx, 0x3c
push eax
call fcn.0040b9ea
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
jmp 0x40b40a
and dword [ebp + 0xc], 0
jmp 0x40b40a
mov ecx, dword [edi + 0xc]
shl eax, 3
cmp dword [eax + ecx], 0
mov dword [ebp - 0x10], eax
je 0x40b40a
push 0xc
call fcn.00427bed
mov esi, eax
test esi, esi
pop ecx
je 0x40b3ec
mov eax, dword [edi + 0xc]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebx + 0x1c]
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 + 0x10]
mov dword [esi], eax
jmp 0x40b3ee
xor esi, esi
mov ecx, dword [ebx + 0x48]
add ecx, 0x3c
cmp dword [ebp - 8], 0
push esi
je 0x40b405
push dword [ebp - 8]
call fcn.00422b54
jmp 0x40b40a
call fcn.00422b2b
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [edi + 8]
mov dword [ebp - 4], eax
jb 0x40b36f
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x414d55
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.00414f50
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x414df0
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 [0x4565bc]
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 0x414df0
cmp eax, 1
je 0x414e11
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 0x414df0
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x414dbd
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x414dec
xor eax, eax
inc eax
jmp 0x414e30
cmp edi, eax
jae 0x414df4
xor eax, eax
jmp 0x414e30
cmp eax, esi
jae 0x414dfb
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 [0x4565bc]
jmp 0x414e14
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 0x415259
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x447a00
call fcn.00416544
mov edi, 0x94
mov eax, edi
call fcn.00414f50
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 [0x4565bc], ecx
mov eax, dword [esi + 4]
mov dword [0x4565c8], eax
mov edx, dword [esi + 8]
mov dword [0x4565cc], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4565c0], esi
cmp ecx, 2
je 0x4152b9
or esi, 0x8000
mov dword [0x4565c0], esi
shl eax, 8
add eax, edx
mov dword [0x4565c4], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4152f4
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4152f4
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x41530c
cmp eax, 0x20b
je 0x4152f9
mov dword [ebp - 0x1c], esi
jmp 0x415320
cmp dword [ecx + 0x84], 0xe
jbe 0x4152f4
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x41531a
cmp dword [ecx + 0x74], 0xe
jbe 0x4152f4
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00419f83
pop ecx
test eax, eax
jne 0x415334
push 0x1c
call fcn.00415235
pop ecx
call fcn.00417d7e
test eax, eax
jne 0x415345
push 0x10
call fcn.00415235
pop ecx
call fcn.0041b98d
mov dword [ebp - 4], esi
call fcn.0041b78f
test eax, eax
jge 0x41535e
push 0x1b
call fcn.00415210
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x457e90], eax
call fcn.0041b66d
mov dword [0x4565a8], eax
call fcn.0041b5cb
test eax, eax
jge 0x415384
push 8
call fcn.00415210
pop ecx
call fcn.0041b398
test eax, eax
jge 0x415395
push 9
call fcn.00415210
pop ecx
push 1
call fcn.0041606c
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4153ab
push eax
call fcn.00415210
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0041b33b
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4153cc
movzx eax, word [ebp - 0x40]
jmp 0x4153cf
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00421391
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4153ed
push edi
call fcn.00416199
call fcn.004161bb
jmp 0x41541f
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0041657f
ret
Function at 0x4160d6
Capabilities:
Terminate process

Disassembly:
push 8
push 0x447a48
call fcn.00416544
push 8
call fcn.0041806f
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x4565fc], esi
jne 0x41610a
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x4565f8], esi
mov al, byte [ebp + 0x10]
mov byte [0x4565f4], al
cmp dword [ebp + 0xc], edi
jne 0x416154
cmp dword [0x457e88], edi
je 0x416144
mov eax, dword [0x457e84]
sub eax, 4
mov dword [0x457e84], eax
cmp eax, dword [0x457e88]
jb 0x416144
mov eax, dword [eax]
cmp eax, edi
je 0x416125
call eax
jmp 0x416125
push 0x452090
mov eax, 0x452088
call fcn.00416054
pop ecx
push 0x45209c
mov eax, 0x452094
call fcn.00416054
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x416185
cmp dword [ebp + 0x10], edi
jne 0x416193
mov dword [0x4565fc], esi
push dword [ebp + 8]
call fcn.00416012
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x416192
push 8
call fcn.00417fba
pop ecx
ret
call fcn.0041657f
ret
Function at 0x41902b
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 0x4191ff
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x456b00]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x4191ff
test cl, 0x48
je 0x419096
cmp byte [eax + 5], 0xa
je 0x419096
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 0x4190e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x4190d0
call fcn.0041469f
mov dword [eax], 9
call fcn.004146a8
mov dword [eax], esi
jmp 0x4190e0
cmp eax, 0x6d
je 0x4191ff
push eax
call fcn.004146b1
pop ecx
or eax, 0xffffffff
jmp 0x419201
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x4191fa
test eax, eax
je 0x41910f
cmp byte [ebx], 0xa
jne 0x41910f
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x419118
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 0x4191f4
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x4191e4
cmp al, 0xd
je 0x41914a
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x4191d6
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x419164
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x41915f
add dword [ebp + 0x10], 2
jmp 0x4191b8
mov dword [ebp + 0x10], eax
jmp 0x4191d2
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 0x41918c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4191d2
cmp dword [ebp - 0xc], 0
je 0x4191d2
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4191ad
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x4191b8
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4191d5
cmp ebx, dword [ebp + 0xc]
jne 0x4191bd
cmp byte [ebp - 1], 0xa
jne 0x4191bd
mov byte [ebx], 0xa
jmp 0x4191d5
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041dd9c
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4191d6
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x41912e
jmp 0x4191f4
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x4191f4
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 0x419201
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41953b
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x453678]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x41956c
xor eax, eax
jmp 0x4196f5
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x456b00]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x4195a8
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.0041e7bd
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x419683
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x4196c1
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x41960c
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4195fd
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x4195dd
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41964c
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x419655
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x4195ce
jmp 0x419657
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x4196f0
cmp dword [ebp - 0x6c], edi
je 0x4196c1
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x4196b6
call fcn.0041469f
mov dword [eax], 9
call fcn.004146a8
mov dword [eax], esi
jmp 0x4196eb
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4196ab
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x419657
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x419657
push dword [ebp - 0x6c]
call fcn.004146b1
pop ecx
jmp 0x4196eb
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4196d9
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x4196d9
xor eax, eax
jmp 0x4196f3
call fcn.0041469f
mov dword [eax], 0x1c
call fcn.004146a8
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x4196f3
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.004154da
add ebp, 0x3a0
leave
ret