joyce8/EMBER2024-capa huggingface dataset:
Function at 0x43f52c
Capabilities:
Get keyboard layout
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffda0
push ebx
xor edx, edx
mov dword [ebp - 0x260], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x43f6d7
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp dword [eax + 0x28], 0
jne 0x43f6b8
mov dl, 1
mov eax, dword [0x40bdb0]
call fcn.00402c28
mov edx, dword [ebp - 4]
mov dword [edx + 0x28], eax
mov eax, dword [ebp - 4]
add eax, 0x2c
call fcn.004038c8
lea eax, [ebp - 0x114]
push eax
push 0x40
call sub.user32.dll_GetKeyboardLayoutList
dec eax
test eax, eax
jl 0x43f6a7
inc eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x114]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.0042df5c
test al, al
je 0x43f69a
lea eax, [ebp - 0xc]
push eax
push 0x20019
push 0
push 0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x25c], eax
mov byte [ebp - 0x258], 0
lea ecx, [ebp - 0x25c]
mov edx, 0x43f6e8
lea eax, [ebp - 0x254]
call fcn.00408344
push eax
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0x43f69a
xor eax, eax
push ebp
push 0x43f693
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 8], pe_nt_image_headers32
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0
push 0x43f720
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
jne 0x43f67c
lea eax, [ebp - 0x260]
lea edx, [ebp - 0x214]
mov ecx, pe_nt_image_headers32
call fcn.00403af8
mov edx, dword [ebp - 0x260]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x28]
mov ebx, dword [eax]
call dword [ebx + 0x38]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x30]
jne 0x43f67c
mov eax, dword [ebp - 4]
add eax, 0x2c
lea edx, [ebp - 0x214]
mov ecx, pe_nt_image_headers32
call fcn.00403af8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x43f69a
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey_1
ret
add dword [ebp - 0x14], 4
dec dword [ebp - 0x10]
jne 0x43f59d
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x28]
mov byte [eax + 0x19], 0
mov dl, 1
call fcn.0040ea34
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x28]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x43f6de
lea eax, [ebp - 0x260]
call fcn.004038c8
ret

Function at 0x43ff24
Capabilities:
Create thread
Set global application hook

Disassembly:
push ecx
mov eax, dword [0x4467c8]
cmp byte [eax + 0x95], 0
jne 0x43ff95
cmp dword [0x4467e4], 0
jne 0x43ff56
call sub.kernel32.dll_GetCurrentThreadId_1
push eax
push 0
mov eax, 0x43fee0
push eax
push 3
call sub.user32.dll_SetWindowsHookExA
mov dword [0x4467e4], eax
cmp dword [0x4467e0], 0
jne 0x43ff71
push 0
push 0
push 0
push 0
call sub.kernel32.dll_CreateEventA
mov dword [0x4467e0], eax
cmp dword [0x4467e8], 0
jne 0x43ff95
push esp
push 0
push 0
push 0x43fe84
push 0x3e8
push 0
call sub.kernel32.dll_CreateThread
mov dword [0x4467e8], eax
pop edx
ret
Function at 0x44008c
Capabilities:
Inspect load icon resource

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
push ebx
push esi
test dl, dl
je 0x4400a3
add esp, 0xfffffff0
call fcn.00402f40
mov byte [ebp - 1], dl
mov ebx, eax
xor edx, edx
mov eax, ebx
call fcn.004119a0
mov byte [ebx + 0x28], 0
mov dl, 1
mov eax, dword [0x40bab0]
call fcn.00402c28
mov dword [ebx + 0x80], eax
mov dl, 1
mov eax, dword [0x40bab0]
call fcn.00402c28
mov dword [ebx + 0x98], eax
xor eax, eax
mov dword [ebx + 0x50], eax
xor eax, eax
mov dword [ebx + 0x74], eax
mov dword [ebx + 0x4c], 0x80000018
mov dword [ebx + 0x68], 0x1f4
mov byte [ebx + 0x6c], 1
xor eax, eax
mov dword [ebx + 0x70], eax
mov dword [ebx + 0x64], 0x9c4
mov byte [ebx + 0x78], 0
mov byte [ebx + 0x8d], 1
mov dl, 1
mov eax, dword [0x41359c]
call fcn.00418fc4
mov esi, eax
mov dword [ebx + 0x88], esi
push 0x440218
mov eax, dword [0x445b0c]
mov eax, dword [eax]
push eax
call sub.user32.dll_LoadIconA
mov edx, eax
mov eax, esi
call fcn.00419394
mov eax, dword [ebx + 0x88]
mov dword [eax + 0xc], ebx
mov dword [eax + 8], 0x441b98
push pe_nt_image_headers32
lea eax, [ebp - 0x101]
push eax
mov eax, dword [0x445b0c]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_GetModuleFileNameA_2
lea eax, [ebp - 0x101]
push eax
lea eax, [ebp - 0x101]
push eax
call sub.user32.dll_OemToCharA
lea eax, [ebp - 0x101]
mov dl, 0x5c
call fcn.004096ac
test eax, eax
je 0x440196
lea edx, [eax + 1]
lea eax, [ebp - 0x101]
call fcn.00407cf8
lea eax, [ebp - 0x101]
mov dl, 0x2e
call fcn.004096d4
test eax, eax
je 0x4401aa
mov byte [eax], 0
lea eax, [ebp - 0x101]
inc eax
push eax
call sub.user32.dll_CharLowerA
lea eax, [ebx + 0x7c]
lea edx, [ebp - 0x101]
mov ecx, pe_nt_image_headers32
call fcn.00403af8
mov eax, dword [0x445a2c]
cmp byte [eax], 0
jne 0x4401db
mov eax, ebx
call fcn.00440304
mov byte [ebx + 0x49], 1
mov byte [ebx + 0x4a], 1
mov byte [ebx + 0x4b], 1
mov byte [ebx + 0x8e], 1
xor eax, eax
mov dword [ebx + 0x90], eax
mov eax, ebx
cmp byte [ebp - 1], 0
je 0x44020d
call fcn.00402f98
pop dword fs:[0]
add esp, 0xc
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x440574
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
push esi
add esp, 0xfffffff8
mov ebx, eax
mov eax, dword [0x4467c8]
cmp dword [eax + 0x24], 0
je 0x440617
cmp dword [ebx + 0x84], 0
jne 0x440611
mov eax, dword [ebx + 0x24]
mov dword [esp], eax
mov byte [esp + 4], dl
mov eax, esp
push eax
push 0x440504
call sub.user32.dll_EnumWindows
mov eax, dword [ebx + 0x80]
cmp dword [eax + 8], 0
je 0x440611
push 3
mov eax, dword [esp + 4]
push eax
call sub.user32.dll_GetWindow
mov esi, eax
mov dword [esp], esi
push 0xffffffffffffffec
push esi
call sub.user32.dll_GetWindowLongA
test al, 8
je 0x4405da
mov dword [esp], 0xfffffffe
mov eax, dword [ebx + 0x80]
mov esi, dword [eax + 8]
dec esi
cmp esi, 0
jl 0x440611
push 0x13
push 0
push 0
push 0
push 0
mov eax, dword [esp + 0x14]
push eax
mov edx, esi
mov eax, dword [ebx + 0x80]
call fcn.0040d174
push eax
call sub.user32.dll_SetWindowPos
dec esi
cmp esi, 0xffffffff
jne 0x4405e9
inc dword [ebx + 0x84]
pop ecx
pop edx
pop esi
pop ebx
ret
Function at 0x441024
Capabilities:
Get graphical window text

Disassembly:
push ebx
push esi
add esp, 0xffffff00
mov esi, edx
mov ebx, eax
cmp byte [ebx + 0x94], 0
je 0x441059
push pe_nt_image_headers32
lea eax, [esp + 4]
push eax
mov eax, dword [ebx + 0x24]
push eax
call sub.user32.dll_GetWindowTextA
mov ecx, eax
mov edx, esp
mov eax, esi
call fcn.004039b0
jmp 0x441063
mov eax, esi
mov edx, dword [ebx + 0x7c]
call fcn.0040391c
add esp, 0x100
pop esi
pop ebx
ret
Function at 0x401000
Capabilities:
Acquire debug privileges
Terminate process

Disassembly:
sub esp, 0x14
mov dword [esp], 0
call dword [sym.imp.KERNEL32.DLL_GetVersion]
lea eax, [esp]
push eax
push 0x28
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x401037
mov ecx, dword [esp]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
add esp, 0x14
ret
lea edx, [esp + 8]
push edx
push 0x40b1a8
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
jne 0x40105d
mov eax, dword [esp]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
add esp, 0x14
ret
mov edx, dword [esp]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 0
push 0
push 0
lea ecx, [esp + 0x14]
push ecx
push 0
push edx
mov dword [esp + 0x20], 1
mov dword [esp + 0x2c], 2
call ebx
test eax, eax
jne 0x40109d
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
pop ebx
add esp, 0x14
ret
mov ecx, dword [esp + 0x1c]
push esi
push edi
push ecx
push 0
push 1
call dword [sym.imp.KERNEL32.DLL_OpenProcess]
mov edi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov esi, eax
test esi, esi
je 0x4010ca
push 0
push esi
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
test eax, eax
je 0x4010ca
push esi
call edi
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4010f1
push 0
push 0
push 0
lea edx, [esp + 0x1c]
push edx
push 0
push eax
mov dword [esp + 0x34], 0
call ebx
mov eax, dword [esp + 0xc]
push eax
call edi
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x14
ret

Function at 0x401100
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
ret

Function at 0x401120
Capabilities:
Set registry value

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
lea eax, [esp + 8]
push eax
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40116e
mov esi, dword [esp + 0x1c]
push esi
call fcn.004086d0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0xc]
add esp, 4
push eax
push esi
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ecx
ret
lea ecx, [esp + 8]
push ecx
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x4011ad
mov esi, dword [esp + 0x1c]
push esi
call fcn.004086d0
mov edx, dword [esp + 0x1c]
add esp, 4
push eax
mov eax, dword [esp + 0xc]
push esi
push 1
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ecx
ret
Function at 0x4011c0
Capabilities:
Set registry value

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
lea eax, [esp + 8]
push eax
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x401205
mov edx, dword [esp + 0x18]
push 4
lea ecx, [esp + 0x20]
push ecx
push 4
push eax
mov eax, dword [esp + 0x18]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ecx
ret
lea edx, [esp + 8]
push edx
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40123c
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 8]
push 4
lea eax, [esp + 0x20]
push eax
push 4
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ecx
ret

Function at 0x401240
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401264
push 0x80
push esi
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
pop esi
ret

Function at 0x401400
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
sub esp, 0x190
lea eax, [esp]
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x401421
xor eax, eax
add esp, 0x190
ret
mov ecx, dword [esp + 0x194]
push esi
push ecx
call sub.WSOCK32.dll_gethostbyname
mov esi, eax
call sub.WSOCK32.dll_WSACleanup
xor eax, eax
test esi, esi
setne al
pop esi
add esp, 0x190
ret
Function at 0x401450
Capabilities:
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
sub esp, 0x40c
push ebx
push 0
push 0
push 0
push 0
push 0x412e90
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
test ebx, ebx
mov dword [esp + 8], ebx
jne 0x40147c
pop ebx
add esp, 0x40c
ret
mov eax, dword [esp + 0x414]
push esi
push 0
push 0x4000100
push 0
push 0
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
test esi, esi
je 0x401550
mov ecx, dword [esp + 0x41c]
push edi
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
test edi, edi
je 0x401532
push ebp
mov ebp, dword [sym.imp.WININET.dll_InternetReadFile]
lea edx, [esp + 0x10]
push edx
push 0x3ff
lea eax, [esp + 0x24]
push eax
push esi
mov dword [esp + 0x20], 0
call ebp
test eax, eax
je 0x40152a
mov ebx, dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x401526
push 0
lea ecx, [esp + 0x1c]
push ecx
push eax
lea edx, [esp + 0x28]
push edx
push edi
mov byte [esp + eax + 0x30], 0
call ebx
lea eax, [esp + 0x10]
push eax
push 0x3ff
lea ecx, [esp + 0x24]
push ecx
push esi
call ebp
test eax, eax
jne 0x4014f3
mov ebx, dword [esp + 0x14]
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop ebp
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push esi
call edi
push ebx
call edi
push esi
call edi
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x40c
ret
pop esi
xor eax, eax
pop ebx
add esp, 0x40c
ret
Function at 0x401e80
Capabilities:
Write file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
push esi
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov esi, eax
test esi, esi
je 0x401ed3
push edi
mov edi, dword [esp + 0x14]
push 0
lea ecx, [esp + 0xc]
push ecx
push edi
call fcn.004086d0
add esp, 4
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop edi
mov eax, 1
pop esi
pop ecx
ret
xor eax, eax
pop esi
pop ecx
ret

Function at 0x401ee0
Capabilities:
Check if file exists
Delete file
Get file attributes
Read file on windows
Set file attributes
Write file on windows

Disassembly:
mov eax, 0x30d48
call fcn.00408870
push 0x410ba0
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x402068
mov eax, dword [0x41140c]
test eax, eax
jne 0x401f13
mov eax, 1
add esp, 0x30d48
ret
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_CreateFileA]
push 0
push 0x80
push 3
push 0
push 0
push closesocket
push 0x410ba0
call edi
mov esi, eax
test esi, esi
je 0x402030
push 0
lea eax, [esp + 0x14]
push eax
push 0x1869f
lea ecx, [esp + 0x24]
push ecx
push esi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov edx, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.DLL_CloseHandle]
push esi
mov byte [esp + edx + 0x1c], 0
call ebp
mov edx, dword [esp + 0x10]
cmp edx, 0x9c40
jbe 0x402030
mov cl, byte [esp + 0x18]
mov al, 0x4a
cmp cl, al
jne 0x402030
mov cl, byte [esp + 0x19]
mov bl, 0x4f
cmp cl, bl
jne 0x402030
cmp byte [esp + 0x1a], 0x57
jne 0x402030
cmp byte [esp + 0x1b], bl
jne 0x402030
cmp byte [esp + edx + 0x14], al
lea ecx, [esp + edx + 0x18]
jne 0x402030
cmp byte [ecx - 3], bl
jne 0x402030
cmp byte [ecx - 2], 0x57
jne 0x402030
cmp byte [ecx - 1], bl
jne 0x402030
lea esi, [edx - 4]
xor eax, eax
test esi, esi
jbe 0x401fe0
add ecx, 0xfffffffb
mov dl, byte [ecx]
mov byte [esp + eax + 0x186b8], dl
inc eax
dec ecx
cmp eax, esi
jb 0x401fd1
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push 0x410d10
call edi
mov esi, eax
test esi, esi
je 0x402030
mov ecx, dword [esp + 0x10]
push 0
lea eax, [esp + 0x18]
push eax
add ecx, 0xfffffff8
push ecx
lea edx, [esp + 0x186c4]
push edx
push esi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push esi
call ebp
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x30d48
ret
push 0x410ba0
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40205b
push 0x80
push 0x410ba0
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
push 0x410ba0
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x30d48
ret
xor eax, eax
add esp, 0x30d48
ret
Function at 0x4023a0
Capabilities:
Manipulate console buffer

Disassembly:
sub esp, 0x20
push esi
push edi
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.DLL_GetStdHandle]
mov esi, eax
lea eax, [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_GetConsoleScreenBufferInfo]
movsx edx, word [esp + 0x16]
movsx eax, word [esp + 0x10]
imul edx, eax
lea ecx, [esp + 0xc]
push ecx
movsx ecx, word [esp + 0x18]
mov word [esp + 0xc], 0
mov word [esp + 0xe], 0
mov edi, dword [esp + 0xc]
push edi
lea edx, [edx + ecx + 1]
push edx
push 0x20
push esi
call dword [sym.imp.KERNEL32.DLL_FillConsoleOutputCharacterA]
mov ax, word [esp + 0x1c]
sub word [esp + 0x20], ax
lea ecx, [esp + 0x1a]
push ecx
push 1
push esi
mov word [esp + 0x28], 0
call dword [sym.imp.KERNEL32.DLL_SetConsoleWindowInfo]
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_SetConsoleCursorPosition]
pop edi
xor eax, eax
pop esi
add esp, 0x20
ret
Function at 0x402d00
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x110
push ebx
push ebp
xor eax, eax
push esi
mov dword [esp + 0x10], 0x40c03c
mov dword [esp + 0x14], 0x40c034
mov dword [esp + 0x18], 0x40c02c
mov dword [esp + 0x1c], 0x40c024
mov dword [esp + 0x20], 0x40c01c
mov dword [esp + 0x24], 0x40c014
mov dword [esp + 0x28], 0x40c00c
mov dword [esp + 0x2c], 0x40c004
mov dword [esp + 0x30], 0x40bffc
mov dword [esp + 0x34], 0x40bff4
mov dword [esp + 0x38], 0x40bfec
mov dword [esp + 0x3c], 0x40bfe0
mov dword [esp + 0x40], 0x40bfd8
mov dword [esp + 0x44], 0x40bfcc
mov dword [esp + 0x48], 0x40bfc4
mov dword [esp + 0x4c], 0x40bfbc
mov dword [esp + 0x50], 0x40bfb4
mov dword [esp + 0x54], 0x40bfac
mov dword [esp + 0x58], 0x40bfa0
mov dword [esp + 0x5c], 0x40bf94
mov dword [esp + 0x60], 0x40bf88
mov dword [esp + 0x64], 0x40bf80
mov dword [esp + 0x68], 0x40bf70
mov dword [esp + 0x6c], 0x40bf64
mov dword [esp + 0x70], 0x40bf58
mov dword [esp + 0x74], 0x40bf4c
mov dword [esp + 0x78], 0x40bf40
mov dword [esp + 0x7c], 0x40bf38
mov dword [esp + 0x80], 0x40bf30
mov dword [esp + 0x84], 0x40bf24
mov dword [esp + 0x88], 0x40bf1c
mov dword [esp + 0x8c], 0x40bf14
mov dword [esp + 0x90], 0x40bf04
mov dword [esp + 0x94], 0x40befc
mov dword [esp + 0x98], 0x40bef4
mov dword [esp + 0x9c], 0x40bee8
mov dword [esp + 0xa0], 0x40bee0
mov dword [esp + 0xa4], 0x40bed8
mov dword [esp + 0xa8], 0x40becc
mov dword [esp + 0xac], 0x40bec4
mov dword [esp + 0xb0], 0x40bebc
mov dword [esp + 0xb4], 0x40beb0
mov dword [esp + 0xb8], 0x40bea8
mov dword [esp + 0xbc], 0x40bea0
mov dword [esp + 0xc0], 0x40be98
mov dword [esp + 0xc4], 0x40be90
mov dword [esp + 0xc8], 0x40be88
mov dword [esp + 0xcc], 0x40be80
mov dword [esp + 0xd0], 0x40be78
mov dword [esp + 0xd4], 0x40be70
mov dword [esp + 0xd8], 0x40be64
mov dword [esp + 0xdc], 0x40be5c
mov dword [esp + 0xe0], 0x40be54
mov dword [esp + 0xe4], 0x40be48
mov dword [esp + 0xe8], 0x40be40
mov dword [esp + 0xec], 0x40be38
mov dword [esp + 0xf0], 0x40be30
mov dword [esp + 0xf4], 0x40be24
mov dword [esp + 0xf8], 0x40be18
mov dword [esp + 0xfc], 0x40be0c
mov dword [esp + 0x100], 0x40be00
mov dword [esp + 0x104], 0x40bdf4
mov dword [esp + 0x108], 0x40bdec
mov dword [esp + 0x10c], 0x40bde4
mov dword [esp + 0x110], 0x40bddc
mov dword [esp + 0x114], 0x40bdd4
mov dword [esp + 0x118], 0x40bdcc
mov dword [esp + 0xc], eax
push edi
lea ecx, [ecx]
mov edi, dword [esp + eax*4 + 0x14]
mov esi, dword [esp + 0x124]
push edi
call fcn.004086d0
mov ebx, eax
add esp, 4
test ebx, ebx
jle 0x402fe2
mov eax, esi
mov cl, byte [eax]
xor ebp, ebp
test cl, cl
je 0x402fe2
push ebx
push edi
push esi
inc ebp
call fcn.0040853c
add esp, 0xc
test eax, eax
je 0x402fde
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x402fc4
jmp 0x402fe2
test ebp, ebp
jg 0x402ffd
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 0x43
mov dword [esp + 0x10], eax
jl 0x402fa0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x110
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x110
ret
Function at 0x403010
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x186a8
call fcn.00408870
mov eax, dword [esp + 0x186ac]
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_CreateFileA]
push 0
push 0x80
push 3
push 0
push 0
push closesocket
push eax
call edi
mov esi, eax
test esi, esi
je 0x403148
push ebx
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x1869f
lea edx, [esp + 0x24]
push edx
push esi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov eax, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.DLL_CloseHandle]
push esi
mov byte [esp + eax + 0x1c], 0
call ebp
mov dl, byte [esp + 0x186d0]
mov bl, byte [esp + 0x186cc]
mov eax, 0x1df
cmp eax, 0x1f0
jb 0x403095
cmp eax, 0x1f7
jbe 0x4030bf
cmp eax, 0x218
jb 0x4030a3
cmp eax, 0x21f
jbe 0x4030bf
cmp eax, 0x240
jb 0x4030b1
cmp eax, 0x247
jbe 0x4030bf
cmp eax, 0x3db
jb case.default.0x4030c9
cmp eax, 0x3e3
ja case.default.0x4030c9
mov ecx, eax
and ecx, 3
cmp ecx, 3
ja case.default.0x4030c9
jmp dword [ecx*4 + 0x403154]
mov cl, byte [esp + 0x186c4]
mov byte [esp + eax + 0x18], cl
jmp case.default.0x4030c9
mov cl, byte [esp + 0x186c8]
mov byte [esp + eax + 0x18], cl
jmp case.default.0x4030c9
mov byte [esp + eax + 0x18], bl
jmp case.default.0x4030c9
mov byte [esp + eax + 0x18], dl
inc eax
cmp eax, 0x3e5
jb 0x403087
mov edx, dword [esp + 0x186c0]
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push edx
call edi
mov esi, eax
test esi, esi
pop ebx
je 0x403148
mov ecx, dword [esp + 0xc]
push 0
lea eax, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x20]
push edx
push esi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push esi
mov edi, eax
call ebp
mov eax, edi
pop edi
pop esi
pop ebp
add esp, 0x186a8
ret
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x186a8
ret