joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5146d0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 8]
push dword [0x6b3da4]
call fcn.0052f519
mov esi, eax
test esi, esi
je 0x5147aa
cmp dword [ebp + 0xc], 0
je 0x51471c
push 4
push dword [esi]
call dword [sym.imp.USER32.dll_GetWindow]
test eax, eax
je 0x51470d
cmp dword [esi + 0x1c], 0
jne 0x51470d
push eax
call dword [sym.imp.USER32.dll_SetActiveWindow]
push 0
push dword [esi]
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x5147aa
test byte [ebp + 0x10], 3
je 0x514737
push 4
push dword [esi]
call dword [sym.imp.USER32.dll_GetWindow]
push eax
push dword [ebp + 0x10]
push dword [esi]
call fcn.0051617a
cmp dword [esi + 0x3c], 0xffffffff
push ebx
je 0x51475c
xor ebx, ebx
cmp dword [esi + 0x3c], 0x1000000
sete bl
xor ecx, ecx
cmp dword [esi + 0x3c], 0x20000000
sete cl
or dword [esi + 0x3c], 0xffffffff
jmp 0x514770
push dword [esi]
call dword [sym.imp.USER32.dll_IsZoomed]
push dword [esi]
mov ebx, eax
call dword [sym.imp.USER32.dll_IsIconic]
mov ecx, eax
test dword [ebp + 0x10], 0x2000000
je 0x51478d
test ebx, ebx
je 0x514781
push 8
jmp 0x514793
neg ecx
sbb ecx, ecx
and ecx, 3
add ecx, 4
jmp 0x5147a0
test ebx, ebx
je 0x514796
push 3
pop ecx
jmp 0x5147a0
xor eax, eax
test ecx, ecx
setne al
lea ecx, [eax + 1]
push ecx
push dword [esi]
call dword [sym.imp.USER32.dll_ShowWindow]
pop ebx
pop esi
pop ebp
ret 0xc

Function at 0x514c7c
Capabilities:
Get graphical window text

Disassembly:
push esi
push edi
push dword [esp + 0xc]
xor esi, esi
push dword [0x6b3da4]
call fcn.0052f519
mov edi, eax
test edi, edi
je 0x514c9f
push dword [edi]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov esi, eax
push dword [esp + 0x10]
push esi
call fcn.0052fd30
test esi, esi
je 0x514cbc
lea ecx, [esi + 1]
push ecx
push eax
push dword [edi]
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x514cc1
xor ecx, ecx
mov word [eax], cx
pop edi
pop esi
ret 8
Function at 0x515e86
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
xor edi, edi
call dword [sym.imp.USER32.dll_GetFocus]
mov ebp, dword [esp + 0x3c]
mov ebx, eax
and dword [esp + 0x10], edi
push str.PB_WindowID
push ebp
call dword [sym.imp.USER32.dll_GetPropW]
mov esi, eax
push 9
pop eax
test esi, esi
je 0x515f1e
lea eax, [esp + 0x14]
push eax
push ebp
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test eax, eax
je 0x515f1b
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x14], eax
jne 0x515f1b
lea eax, [esi - 1]
push eax
push dword [0x6b3da4]
call fcn.0052f519
mov edi, eax
mov dword [esp + 0x10], 1
xor eax, eax
push 9
cmp dword [edi + 0x10], eax
jle 0x515f1d
mov edx, dword [edi + 4]
xor ecx, ecx
pop esi
cmp word [ecx + edx + 2], si
jne 0x515f12
mov esi, 0xfa01
push 9
cmp word [ecx + edx + 4], si
je 0x516005
pop esi
inc eax
add ecx, 6
cmp eax, dword [edi + 0x10]
jl 0x515ef8
push 9
pop eax
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
test ebx, ebx
je 0x515fc4
push eax
call esi
test al, al
jns 0x515fc4
push 0x11
call esi
test al, al
js 0x515fc4
push 0x10
call esi
test al, al
js 0x515fc4
push 0x12
call esi
test al, al
js 0x515fc4
push 0x10
lea eax, [esp + 0x1c]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetClassNameW]
cmp dword [esp + 0x10], 0
jne 0x515fc4
push 5
lea eax, [esp + 0x1c]
push str.RichE
push eax
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
je 0x515f98
push 4
lea eax, [esp + 0x1c]
push str.RICHE
push eax
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x515faf
push 0
push 0
push 0x44e
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, 0x800
je 0x51600f
lea eax, [esp + 0x18]
push str.Scintilla
push eax
call sub.MSVCRT.dll_wcscmp
pop ecx
pop ecx
test eax, eax
je 0x51600f
test ebp, ebp
je 0x515fe8
push 0x11
call esi
test al, al
js 0x515fe0
push 0x10
call esi
test al, al
js 0x515fe0
push 0x12
call esi
test al, al
jns 0x515fe8
push 1
push ebp
call fcn.0051601b
test ebx, ebx
je 0x515ffc
push str.PB_Hotkey
push ebx
call dword [sym.imp.USER32.dll_GetPropW]
test eax, eax
jne 0x51600f
test edi, edi
je 0x51600f
mov eax, dword [edi + 8]
jmp 0x516011
and dword [esp + 0x14], 0
jmp 0x515f1d
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 4

Function at 0x51651a
Capabilities:
Delete file
Set file attributes

Disassembly:
cmp dword [esp + 4], 0
je 0x516543
test byte [esp + 8], 2
je 0x516537
push pe_nt_image_headers32
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x516545
xor eax, eax
ret 8
Function at 0x51656f
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
cmp dword [ebp + 8], 0
je 0x5165e7
push 0x104
push dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [ebp - 4], ax
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcslen
lea ecx, [ebp - 0x20c]
add esp, 0x10
lea eax, [ecx + eax*2]
jmp 0x5165c8
movzx ecx, word [eax - 2]
cmp ecx, 0x20
je 0x5165c5
cmp ecx, 0x5c
je 0x5165c5
cmp ecx, 0x2f
jne 0x5165d2
add eax, 0xfffffffe
lea ecx, [ebp - 0x20c]
cmp eax, ecx
ja 0x5165b2
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x5165e9
xor eax, eax
mov esp, ebp
pop ebp
ret 4
Function at 0x51697f
Capabilities:
Check if file exists

Disassembly:
xor eax, eax
push ebp
mov ebp, eax
mov eax, dword [0x6b3388]
push esi
test eax, eax
jne 0x5169a4
push fcn.00516aac
push 0x10
push 0x258
call fcn.0052f5ec
mov dword [0x6b3388], eax
push dword [esp + 0xc]
push eax
call fcn.0052f558
mov esi, eax
test esi, esi
je 0x516aa5
push edi
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x5169c6
mov edi, 0x5cc008
push ebx
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x5169d6
xor eax, eax
cmp word [ebx], ax
jne 0x5169db
mov ebx, 0x5cd2b4
push edi
call sub.MSVCRT.dll_wcslen
push ebx
mov dword [esp + 0x24], eax
call sub.MSVCRT.dll_wcslen
add eax, dword [esp + 0x24]
pop ecx
pop ecx
lea eax, [eax*2 + 4]
push eax
xor eax, eax
push eax
push dword [0x6b00f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x516a8c
push edi
push eax
call sub.MSVCRT.dll_wcscpy
mov eax, dword [esp + 0x24]
pop ecx
pop ecx
test eax, eax
je 0x516a3c
cmp word [edi + eax*2 - 2], 0x5c
mov edi, dword [esp + 0x18]
je 0x516a40
push 0x5cd2a8
push edi
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
jmp 0x516a40
mov edi, dword [esp + 0x18]
push ebx
push edi
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esi + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x516a64
xor eax, eax
mov ebp, esi
mov dword [esi + 4], eax
jmp 0x516a7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x516a78
mov dword [esi + 4], 1
mov ebp, esi
xor eax, eax
push edi
push eax
push dword [0x6b00f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
test ebp, ebp
jne 0x516aa3
cmp dword [esp + 0x14], 0xffffffff
je 0x516a97
mov esi, dword [esp + 0x14]
push esi
push dword [0x6b3388]
call fcn.0052f4ca
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
ret 0xc
Function at 0x516df7
Capabilities:
Get disk information
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x45c
push esi
or esi, 0xffffffff
push edi
mov edi, esi
test eax, eax
je 0x516f3f
xor ecx, ecx
cmp word [eax], cx
je 0x516f3f
push 0x104
push eax
lea eax, [esp + 0x10]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [esp + 0x21c], ax
lea eax, [esp + 0x14]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 0x10
lea ecx, [esp + eax*2 + 6]
cmp eax, 2
je 0x516e50
cmp eax, 3
jne 0x516e8a
cmp word [esp + 0xa], 0x3a
jne 0x516e8a
cmp eax, 2
jne 0x516e6e
lea eax, [esp + 8]
push 0x5cd2a8
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x516f3f
push 0xfffffffffffffffe
pop edi
jmp 0x516f3f
push ebx
push ebp
push 0x5c
pop ebp
push 0x2f
pop ebx
movzx eax, word [ecx]
cmp ax, bp
je 0x516e9f
cmp ax, bx
jne 0x516ea9
xor eax, eax
mov word [ecx], ax
sub ecx, 2
jmp 0x516e92
lea eax, [esp + 0x21c]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, esi
je 0x516ee8
test byte [esp + 0x21c], 0x10
je 0x516ecf
push 0xfffffffffffffffe
pop edi
jmp 0x516edf
mov esi, dword [esp + 0x238]
xor edi, edi
or edi, dword [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x516f3d
cmp word [esp + 0x10], bp
jne 0x516ef6
cmp word [esp + 0x12], bp
je 0x516f15
cmp word [esp + 0x10], bx
jne 0x516f04
cmp word [esp + 0x12], bx
je 0x516f15
push 0x2e
pop eax
cmp word [esp + 0x10], ax
jne 0x516f3d
cmp word [esp + 0x12], ax
jne 0x516f3d
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, esi
je 0x516f2a
test al, 0x10
je 0x516f3d
jmp 0x516f3a
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x516f3d
push 0xfffffffffffffffe
pop edi
pop ebp
pop ebx
mov eax, edi
mov edx, esi
pop edi
pop esi
add esp, 0x45c
ret 4

Function at 0x516f4e
Capabilities:
Copy file

Disassembly:
cmp dword [esp + 4], 0
je 0x516f6e
cmp dword [esp + 8], 0
je 0x516f6e
push 0
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
jmp 0x516f70
xor eax, eax
ret 8

Function at 0x517140
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x51717c
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4
Function at 0x5175f0
Capabilities:
Write file on windows

Disassembly:
push dword [esp + 4]
push dword [0x6b3db8]
call fcn.0052f519
test eax, eax
je case.0x51761e.3
mov ecx, dword [esp + 8]
add ecx, 0xfffffffe
cmp ecx, 0x17
ja case.0x51761e.3
movzx ecx, byte [ecx + 0x517728]
jmp dword [ecx*4 + 0x517710]
cmp dword [eax + 4], 0
je 0x51763b
push 2
push 0x5cd878
push eax
call fcn.00517e20
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 2
push 0x5cd878
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x51766a
push 3
push 0x5ccdc0
push eax
call fcn.00517e20
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 3
push 0x5ccdc0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x517699
push 2
push 0x5cd87c
push eax
call fcn.00517e20
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 2
push 0x5cd87c
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x5176c8
push 4
push 0x5cd880
push eax
call fcn.00517e20
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 4
push 0x5cd880
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x5176f7
push 4
push 0x5cd888
push eax
call fcn.00517e20
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 4
push 0x5cd888
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8

Function at 0x5177e0
Capabilities:
Read file on windows

Disassembly:
push ecx
push dword [esp + 8]
mov byte [esp + 7], 0
push dword [0x6b3db8]
call fcn.0052f519
test eax, eax
je 0x51782b
cmp dword [eax + 4], 0
je 0x517815
push 1
lea ecx, [esp + 7]
push ecx
push eax
call fcn.00518040
movsx eax, byte [esp + 3]
pop ecx
ret 4
push 0
lea ecx, [esp + 0xc]
push ecx
push 1
lea ecx, [esp + 0xf]
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movsx eax, byte [esp + 3]
pop ecx
ret 4

Function at 0x517840
Capabilities:
Read file on windows

Disassembly:
push ecx
push dword [esp + 8]
mov dword [esp + 4], 0
push dword [0x6b3db8]
call fcn.0052f519
test eax, eax
je 0x51788d
cmp dword [eax + 4], 0
je 0x517877
push 2
lea ecx, [esp + 4]
push ecx
push eax
call fcn.00518040
movsx eax, word [esp]
pop ecx
ret 4
push 0
lea ecx, [esp + 0xc]
push ecx
push 2
lea ecx, [esp + 0xc]
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movsx eax, word [esp]
pop ecx
ret 4
Function at 0x517980
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push ebx
push dword [0x6b3db8]
mov dword [esp + 0x10], 0
call fcn.0052f519
mov ebp, eax
test ebp, ebp
je 0x517adc
push esi
push edi
push ebx
call fcn.005178a0
cmp dword [ebp + 4], 0
mov esi, eax
mov edi, edx
je 0x5179cc
push 4
lea eax, [esp + 0x1c]
push eax
push ebp
call fcn.00518040
mov ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x5179e7
push 0
lea eax, [esp + 0x14]
push eax
push 4
lea eax, [esp + 0x24]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x10]
cmp ecx, 2
jl 0x517a15
lea edx, [esp + 0x18]
mov eax, 0xfeff
cmp word [edx], ax
jne 0x517a15
add esi, 2
adc edi, 0
push edi
push esi
push ebx
call fcn.00517910
pop edi
pop esi
pop ebp
mov eax, 0x19
pop ebx
pop ecx
ret 4
cmp ecx, 3
jl 0x517a46
lea edx, [esp + 0x18]
cmp word [edx], 0xbbef
jne 0x517a46
cmp byte [edx + 2], 0xbf
jne 0x517a46
add esi, 3
adc edi, 0
push edi
push esi
push ebx
call fcn.00517910
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
pop ecx
ret 4
cmp ecx, 2
jl 0x517a74
lea edx, [esp + 0x18]
mov eax, 0xfffe
cmp word [edx], ax
jne 0x517a74
add esi, 2
adc edi, 0
push edi
push esi
push ebx
call fcn.00517910
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
pop ecx
ret 4
cmp ecx, 4
jl 0x517ac7
lea eax, [esp + 0x18]
cmp dword [eax], 0xfeff
jne 0x517aa0
add esi, 4
adc edi, 0
push edi
push esi
push ebx
call fcn.00517910
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
pop ecx
ret 4
lea eax, [esp + 0x18]
cmp dword [eax], 0xfffe0000
jne 0x517ac7
add esi, 4
adc edi, 0
push edi
push esi
push ebx
call fcn.00517910
pop edi
pop esi
pop ebp
mov eax, 6
pop ebx
pop ecx
ret 4
push edi
push esi
push ebx
call fcn.00517910
pop edi
pop esi
pop ebp
mov eax, 0x18
pop ebx
pop ecx
ret 4
pop ebp
mov eax, 0x18
pop ebx
pop ecx
ret 4

Function at 0x517af0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push dword [esp + 0x10]
mov dword [esp + 8], 0
push dword [0x6b3db8]
call fcn.0052f519
mov esi, eax
test esi, esi
je 0x517b6f
cmp dword [esi + 4], 0
je 0x517b40
push 1
lea eax, [esp + 8]
push eax
push esi
call fcn.00518040
test eax, eax
je 0x517b34
inc dword [esi + 0xc]
xor eax, eax
pop esi
add esp, 8
ret 4
mov eax, 1
pop esi
add esp, 8
ret 4
push 0
lea eax, [esp + 0xc]
push eax
push 1
lea eax, [esp + 0x1c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x517b7a
cmp dword [esp + 8], 0
je 0x517b7a
push 1
push 0
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 4
or eax, 0xffffffff
pop esi
add esp, 8
ret 4

Function at 0x517cf0
Capabilities:
Read file on windows

Disassembly:
push ecx
push dword [esp + 8]
mov dword [esp + 4], 0
push dword [0x6b3db8]
call fcn.0052f519
test eax, eax
je 0x517d3c
cmp dword [eax + 4], 0
je 0x517d26
push 4
lea ecx, [esp + 4]
push ecx
push eax
call fcn.00518040
mov eax, dword [esp]
pop ecx
ret 4
push 0
lea ecx, [esp + 0xc]
push ecx
push 4
lea ecx, [esp + 0xc]
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp]
pop ecx
ret 4
Function at 0x517d50
Capabilities:
Read file on windows

Disassembly:
push ecx
push dword [esp + 8]
mov dword [esp + 4], 0
push dword [0x6b3db8]
call fcn.0052f519
test eax, eax
je 0x517d9d
cmp dword [eax + 4], 0
je 0x517d87
push 2
lea ecx, [esp + 4]
push ecx
push eax
call fcn.00518040
movzx eax, word [esp]
pop ecx
ret 4
push 0
lea ecx, [esp + 0xc]
push ecx
push 2
lea ecx, [esp + 0xc]
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [esp]
pop ecx
ret 4

Function at 0x517db0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
mov dword [esp + 4], 0
test esi, esi
je 0x517e15
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x517e0d
push dword [esp + 0x10]
push dword [0x6b3db8]
call fcn.0052f519
test eax, eax
je 0x517e03
cmp dword [eax + 4], 0
je 0x517df2
push edi
push esi
push eax
call fcn.00517e20
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea ecx, [esp + 0xc]
push ecx
push edi
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
pop edi
xor eax, eax
pop esi
pop ecx
ret 0xc
xor eax, eax
pop esi
pop ecx
ret 0xc

Function at 0x517e20
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
mov dword [esp + 4], 0
cmp dword [esi + 0x1c], 0
jne 0x517f27
cmp dword [esi + 0x14], 1
jne 0x517e6b
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0xc]
push 1
neg eax
cdq
push ecx
push eax
push dword [esi]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
push edi
mov edi, dword [esp + 0x20]
cmp eax, edi
jle 0x517ee8
mov ecx, dword [esi + 8]
add ecx, dword [esi + 4]
sub ecx, eax
mov eax, edi
dec eax
je 0x517ed3
dec eax
je 0x517ebc
sub eax, 2
je 0x517ea7
push edi
push dword [esp + 0x20]
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov ax, word [eax]
mov word [ecx], ax
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov al, byte [eax]
mov byte [ecx], al
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
push esi
call fcn.00517140
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x517f15
push 0
lea eax, [esp + 0xc]
push eax
push edi
push dword [esp + 0x28]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
add esp, 0xc
ret 0xc
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0xc]
push edi
push dword [esp + 0x20]
add ecx, eax
jmp 0x517e91
xor eax, eax
pop esi
add esp, 0xc
ret 0xc
Function at 0x517f30
Capabilities:
Write file on windows

Disassembly:
push ecx
mov edx, dword [esp + 0xc]
mov dword [esp], 0
test edx, edx
je 0x518038
cmp word [edx], 0
je 0x518038
mov ecx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0xc]
test ecx, ecx
jne 0x517f5e
mov ecx, dword [esi + 0x18]
push edi
cmp ecx, 0x19
jne 0x517fbd
cmp dword [esi + 4], 0
mov ecx, edx
lea edi, [ecx + 2]
je 0x517f90
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x517f70
sub ecx, edi
sar ecx, 1
lea eax, [ecx + ecx]
push eax
push edx
push esi
call fcn.00517e20
pop edi
pop esi
pop ecx
ret 0xc
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x517f90
sub ecx, edi
lea eax, [esp + 8]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push edx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
xor eax, eax
cmp ecx, 2
lea ecx, [esp + 0x14]
setne al
push ecx
dec eax
and eax, 0xfde9
push edx
push eax
call fcn.00518610
mov edi, eax
test edi, edi
je 0x517fb3
cmp dword [esi + 4], 0
je 0x51800b
push dword [esp + 0x14]
push edi
push esi
call fcn.00517e20
push edi
push 0
push dword [0x6b00f0]
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x1c]
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push 0
push dword [0x6b00f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
xor eax, eax
pop ecx
ret 0xc
Function at 0x518040
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
cmp dword [esi + 0x14], 0
jne 0x518061
push esi
call fcn.00517140
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0x10]
cmp ebx, edi
jl 0x5180d5
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
dec ecx
je 0x5180c2
dec ecx
je 0x5180ad
sub ecx, 2
je 0x51809a
push edi
push eax
push dword [esp + 0x1c]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov cx, word [eax]
mov eax, dword [esp + 0x14]
mov word [eax], cx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
mov eax, edi
mov byte [ecx], dl
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
push ebp
mov ebp, dword [esp + 0x18]
sub eax, ebx
add eax, dword [esi + 4]
push ebx
push eax
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
push 0
cmp edi, eax
jl 0x51811a
lea eax, [esp + 0x18]
push eax
push edi
push ebp
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
add eax, ebx
pop esi
pop ebx
ret 0xc
lea ecx, [esp + 0x18]
push ecx
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
cmp edi, eax
jle 0x51813b
mov edi, eax
push edi
push dword [esi + 4]
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
lea eax, [ebx + edi]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x518160
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x6b00f0]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x5182e4
mov cl, byte [esp + 3]
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x5181ae
test ebp, ebp
je 0x518250
dec ebp
cmp dword [ebx + 4], 0
je 0x5181c7
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.00518040
mov dword [esp + 0x14], eax
jmp 0x5181e1
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov cl, byte [esp + 0x13]
cmp eax, 1
jne 0x518250
test cl, cl
je 0x5181f5
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x13]
mov eax, dword [esp + 0x18]
mov edi, esi
mov edx, dword [esp + 0x20]
dec eax
sub edi, edx
cmp edi, eax
jle 0x518230
mov eax, dword [esp + 0x18]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x6b00f0]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x20], edx
lea esi, [edi + edx]
test cl, cl
je 0x518250
cmp dword [esp + 0x2c], 0
jne 0x5181a0
cmp cl, 0xd
je 0x518257
cmp cl, 0xa
jne 0x5181a0
dec esi
jmp 0x5182c7
cmp dword [esp + 0x2c], 0
jne 0x5182c7
cmp cl, 0xa
jne 0x51825f
dec esi
jmp 0x5182c7
cmp cl, 0xd
jne 0x5182c7
dec esi
cmp dword [ebx + 4], 0
je 0x51827e
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.00518040
mov dword [esp + 0x14], eax
jmp 0x518294
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x5182c7
cmp dword [ebx + 4], 0
je 0x5182a6
inc dword [ebx + 0xc]
jmp 0x5182c7
push 1
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x20]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10