joyce8/EMBER2024-capa huggingface dataset:
Function at 0x419a56
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov dword [ebp - 8], 0
push 0x105
lea eax, [ebp - 0x110]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x419ac6
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x110]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x419ab3
mov eax, dword [ebp - 4]
push eax
call fcn.00419a56
add esp, 4
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [ebp - 0x110]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
jmp 0x419a66
mov esp, ebp
pop ebp
ret

Function at 0x41a3d9
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push 0x104
lea eax, [ebp - 0x104]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x104]
push ecx
call fcn.0041ac20
add esp, 4
sub eax, 1
mov dword [ebp - 0x108], eax
jmp 0x41a426
mov edx, dword [ebp - 0x108]
sub edx, 1
mov dword [ebp - 0x108], edx
mov eax, dword [ebp - 0x108]
movsx ecx, byte [ebp + eax - 0x104]
cmp ecx, 0x5c
jne 0x41a43b
jmp 0x41a44b
mov edx, dword [ebp - 0x108]
mov byte [ebp + edx - 0x104], 0
jmp 0x41a417
push str.Xmanager.ini
lea eax, [ebp - 0x104]
push eax
call fcn.0041acb0
add esp, 8
lea ecx, [ebp - 0x104]
push ecx
push 0
push str.DisplayNumber
push str.Options
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov esp, ebp
pop ebp
ret

Function at 0x41a5d4
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push str.Xmanager:NET
push 0x428b68
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
jne 0x41a665
push 0x145
call fcn.004017a0
add esp, 4
push eax
call fcn.0041705e
add esp, 4
cmp dword [0x435e94], 0
je 0x41a62c
call fcn.0041a3d9
push eax
push str.Xmanager.exe__passive_:__d_
lea eax, [ebp - 0x104]
push eax
call fcn.0041ad90
add esp, 0xc
jmp 0x41a640
push str.Xmanager.exe__passive
lea ecx, [ebp - 0x104]
push ecx
call fcn.0041ad90
add esp, 8
push 5
lea edx, [ebp - 0x104]
push edx
call dword [sym.imp.KERNEL32.dll_WinExec]
cmp eax, 0x1f
ja 0x41a665
push 0xea
call fcn.00416e5e
add esp, 4
xor eax, eax
jmp 0x41a66a
mov eax, 1
mov esp, ebp
pop ebp
ret

Function at 0x41a66e
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov word [ebp - 4], 0x101
lea eax, [ebp - 0x194]
push eax
mov cx, word [ebp - 4]
push ecx
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x41a6a3
push 0xe4
call fcn.00416e5e
add esp, 4
xor eax, eax
jmp 0x41a6ec
mov edx, dword [ebp - 0x194]
and edx, 0xff
cmp edx, 1
jne 0x41a6d1
mov eax, dword [ebp - 0x194]
and eax, 0xffff
sar eax, 8
and eax, 0xff
and eax, 0xff
cmp eax, 1
je 0x41a6e7
push 0xe5
call fcn.00416e5e
add esp, 4
call sub.WSOCK32.dll_WSACleanup
xor eax, eax
jmp 0x41a6ec
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x402a70
Capabilities:
Hash data with md5

Disassembly:
xor eax, eax
mov byte [esi + 0x68], al
mov dword [esi + 0x14], eax
mov dword [esi + 0x10], eax
mov dword [esi], 0x67452301
mov dword [esi + 4], 0xefcdab89
mov dword [esi + 8], 0x98badcfe
mov dword [esi + 0xc], 0x10325476
mov dword [esi + 0x58], eax
mov dword [esi + 0x5c], eax
mov dword [esi + 0x60], eax
mov dword [esi + 0x64], eax
cmp dword [ecx + 0x18], 0x10
mov eax, dword [ecx + 0x14]
jb 0x402ab9
mov ecx, dword [ecx + 4]
push ecx
mov ecx, esi
call fcn.00402ad0
mov eax, esi
ret
add ecx, 4
push ecx
mov ecx, esi
call fcn.00402ad0
mov eax, esi
ret

Function at 0x403790
Capabilities:
Set registry value

Disassembly:
sub esp, 8
push ebx
lea ecx, [esp + 8]
push ecx
mov ecx, dword [eax + 0x20c]
lea edx, [esp + 8]
push edx
push 0
or ecx, 0x20006
push ecx
push 0
push 0
push 0
lea edx, [eax + 4]
mov eax, dword [eax]
push edx
push eax
xor bl, bl
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4037f9
test esi, esi
je 0x4037f7
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push ecx
push edx
push 3
push eax
mov eax, dword [esp + 0x14]
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4037f9
mov bl, 1
mov eax, dword [esp + 4]
test eax, eax
je 0x403813
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
pop ebx
add esp, 8
ret 8

Function at 0x403820
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
mov edx, dword [eax + 0x20c]
push ebx
lea ecx, [esp + 4]
push ecx
or edx, 1
push edx
mov edx, dword [eax]
push 0
lea ecx, [eax + 4]
push ecx
push edx
xor bl, bl
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40387f
test esi, esi
je 0x40387d
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
mov eax, dword [esp + 8]
push ecx
lea edx, [esp + 0x10]
push edx
push 0
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40387f
mov bl, 1
mov eax, dword [esp + 4]
test eax, eax
je 0x40388e
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
pop ebx
add esp, 8
ret 8
Function at 0x403930
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ecx
push esi
mov esi, eax
call fcn.004039d0
test al, al
jne 0x403945
or eax, 0xffffffff
pop esi
pop ecx
ret 0x10
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
push 0x10
lea eax, [esi + 0x28]
push eax
mov eax, dword [esi + 0x48]
push 0
push ecx
push edx
push eax
mov dword [esp + 0x1c], 0x10
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
je 0x40393d
xor eax, eax
cmp dword [esp + 0x14], eax
je 0x4039c3
cmp dword [esp + 0x18], eax
jle 0x4039c3
push edi
xor edi, edi
cmp dword [esi + 0x24], eax
jle 0x4039c2
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_recvfrom]
push ebp
lea ebp, [esi + 0x38]
nop
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esi + 0x48]
push ebp
push 0
push edx
push eax
push ecx
call ebx
cmp eax, 0xffffffff
jne 0x4039c0
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, dword [esi + 0x24]
jl 0x403990
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
pop ecx
ret 0x10

Function at 0x4039d0
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
sub esp, 8
push ebx
xor ebx, ebx
cmp dword [esi + 0x48], ebx
je 0x4039e2
mov al, 1
pop ebx
add esp, 8
ret
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x48], eax
cmp eax, ebx
jne 0x4039fc
xor al, al
pop ebx
add esp, 8
ret
mov ecx, dword [esi + 0x24]
push edi
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 8
lea edx, [esp + 0xc]
push edx
push 0x1005
push 0xffff
push eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ebx
call edi
cmp eax, 0xffffffff
je 0x403aed
mov ecx, dword [esi + 0x48]
push 8
lea eax, [esp + 0xc]
push eax
push 0x1006
push 0xffff
push ecx
call edi
cmp eax, 0xffffffff
je 0x403aed
push ebp
mov edx, 2
push esi
mov word [esi + 0x28], dx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, dword [sym.imp.WS2_32.dll_htons]
mov dword [esi + 0x2c], eax
movzx eax, word [esi + 0x20]
push eax
call edi
movzx edx, word [esi + 0x22]
mov ecx, 2
lea ebp, [esi + 0x38]
push edx
mov word [esi + 0x2a], ax
mov word [ebp], cx
mov dword [esi + 0x3c], ebx
call edi
mov word [esi + 0x3a], ax
xor bl, bl
lea esp, [esp]
mov eax, dword [esi + 0x48]
push 0x10
push ebp
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x403aca
cmp bl, 0xa
je 0x403ad3
call fcn.004405ad
cdq
mov ecx, 0x64
idiv ecx
add word [esi + 0x22], dx
movzx eax, word [esi + 0x22]
push eax
call edi
inc bl
mov word [esi + 0x3a], ax
cmp bl, 0xa
jbe 0x403a90
pop ebp
pop edi
mov al, 1
pop ebx
add esp, 8
ret
mov edx, dword [esi + 0x48]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
pop ebp
pop edi
mov dword [esi + 0x48], 0
xor al, al
pop ebx
add esp, 8
ret
mov eax, dword [esi + 0x48]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
mov dword [esi + 0x48], ebx
xor al, al
pop ebx
add esp, 8
ret
Function at 0x403fe0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x4935a9
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x4b6170]
xor eax, esp
mov dword [esp + 0x4c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4b6170]
xor eax, esp
push eax
lea eax, [esp + 0x64]
mov dword fs:[0], eax
mov esi, ecx
mov edi, edx
xor ebp, ebp
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x40], ebp
mov ebx, 1
push esi
mov dword [esp + 0x70], ebx
call fcn.0041f2b0
mov dword [esp + 0x40], ebx
cmp edi, ebp
je 0x4041c4
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x404044
sub eax, edx
sar eax, 1
mov dword [esp + 0x20], eax
cmp dword [esp + 0x88], eax
jb 0x4041c4
xor eax, eax
push 0xffffffffffffffff
mov word [esp + 0x4c], ax
push ebp
lea eax, [esp + 0x7c]
lea ecx, [esp + 0x4c]
mov dword [esp + 0x64], 7
mov dword [esp + 0x60], ebp
call fcn.004027a0
mov byte [esp + 0x6c], 2
cmp dword [esp + 0x58], ebp
jbe 0x4041b0
jmp 0x4040a4
mov edi, dword [esp + 0x1c]
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x4040b0
sub eax, edx
sar eax, 1
mov ebx, eax
push edi
lea eax, [esp + 0x48]
call fcn.00404300
mov edi, eax
cmp edi, ebp
jl 0x404187
cmp dword [esp + 0x5c], 8
mov eax, dword [esp + 0x48]
jae 0x4040e4
lea eax, [esp + 0x48]
xor ecx, ecx
push edi
lea esi, [esp + 0x28]
mov dword [esp + 0x40], 7
mov dword [esp + 0x3c], ebp
mov word [esp + 0x2c], cx
call fcn.00403500
mov edx, esi
mov byte [esp + 0x6c], 3
mov ebx, dword [esp + 0x18]
push edx
call fcn.00404260
mov bl, 2
mov esi, 8
mov byte [esp + 0x6c], bl
cmp dword [esp + 0x3c], esi
jb 0x404130
mov eax, dword [esp + 0x28]
push eax
call fcn.0043f604
add esp, 4
mov edx, dword [esp + 0x20]
xor ecx, ecx
push 0xffffffffffffffff
add edi, edx
mov word [esp + 0x2c], cx
push edi
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], 7
mov dword [esp + 0x40], ebp
call fcn.004027a0
push 0xffffffffffffffff
push ebp
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x4c]
mov byte [esp + 0x74], 4
call fcn.004027a0
mov byte [esp + 0x6c], bl
cmp dword [esp + 0x3c], esi
jb 0x4041a2
mov eax, dword [esp + 0x28]
push eax
call fcn.0043f604
add esp, 4
jmp 0x4041a2
lea ecx, [esp + 0x44]
push ecx
mov ebx, esi
call fcn.00404260
push ebp
mov eax, 0x4a7410
lea esi, [esp + 0x48]
call fcn.00403500
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x58], ebp
ja 0x4040a0
cmp dword [esp + 0x5c], 8
jb 0x4041c4
mov edx, dword [esp + 0x48]
push edx
call fcn.0043f604
add esp, 4
cmp dword [esp + 0x8c], 8
jb 0x4041db
mov eax, dword [esp + 0x78]
push eax
call fcn.0043f604
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4c]
xor ecx, esp
call fcn.0043f4b7
add esp, 0x5c
ret
Function at 0x404dd0
Capabilities:
Check os version

Disassembly:
sub esp, 0x130
mov eax, dword [0x4b6170]
xor eax, esp
mov dword [esp + 0x12c], eax
mov eax, dword [0x4b92a8]
push ebp
xor ebp, ebp
push esi
mov esi, 0x20
cmp eax, ebp
jne 0x4050a0
push ebx
push edi
push str.IsWow64Process
push str.kernel32
mov dword [0x4b92a8], ebp
mov dword [esp + 0x20], ebp
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov edi, eax
cmp edi, ebp
je 0x404e33
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
cmp dword [esp + 0x18], ebp
je 0x404e3e
mov esi, 0x40
push str.ntdll.dll
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], ebp
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebp
je 0x405099
push str.RtlGetNtVersionNumbers
push edi
call ebx
cmp eax, ebp
je 0x405092
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
push ecx
call eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x14]
cmp eax, 4
jne 0x404eb5
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x404ea6
cmp eax, 0xa
je 0x404ea6
cmp eax, 0x5a
jne 0x405099
mov dword [0x4b92a8], 1
jmp 0x405099
cmp eax, 5
jne 0x404f3f
mov eax, dword [esp + 0x10]
cmp eax, ebp
jne 0x404ed5
mov dword [0x4b92a8], 2
jmp 0x405099
cmp eax, 1
jne 0x404f08
cmp si, 0x20
jne 0x404eef
mov dword [0x4b92a8], 4
jmp 0x405099
cmp si, 0x40
jne 0x405099
mov dword [0x4b92a8], 8
jmp 0x405099
cmp eax, 2
jne 0x405099
cmp si, 0x20
jne 0x404f26
mov dword [0x4b92a8], 0x10
jmp 0x405099
cmp si, 0x40
jne 0x405099
mov dword [0x4b92a8], 0x20
jmp 0x405099
cmp eax, 6
jne 0x40506c
mov eax, dword [esp + 0x10]
cmp eax, ebp
jne 0x404fe0
push 0x11c
lea edx, [esp + 0x24]
push ebp
push edx
call fcn.00446600
add esp, 0xc
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x24], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp byte [esp + 0x13a], 3
jne 0x404fb2
cmp si, 0x20
jne 0x404f99
mov dword [0x4b92a8], 0x100
jmp 0x405099
cmp si, 0x40
jne 0x405099
mov dword [0x4b92a8], 0x200
jmp 0x405099
cmp si, 0x20
jne 0x404fc7
mov dword [0x4b92a8], 0x40
jmp 0x405099
cmp si, 0x40
jne 0x405099
mov dword [0x4b92a8], 0x80
jmp 0x405099
cmp eax, 1
jne 0x405013
cmp si, 0x20
jne 0x404ffa
mov dword [0x4b92a8], 0x400
jmp 0x405099
cmp si, 0x40
jne 0x405099
mov dword [0x4b92a8], 0x800
jmp 0x405099
cmp eax, 2
jne 0x40503c
cmp si, 0x20
jne 0x40502a
mov dword [0x4b92a8], 0x1000
jmp 0x405099
cmp si, 0x40
jne 0x405099
mov dword [0x4b92a8], 0x2000
jmp 0x405099
cmp eax, 3
jne 0x405065
cmp si, 0x20
jne 0x405053
mov dword [0x4b92a8], 0x4000
jmp 0x405099
cmp si, 0x40
jne 0x405099
mov dword [0x4b92a8], 0x8000
jmp 0x405099
cmp eax, 4
jb 0x405099
jmp 0x40506e
jbe 0x405099
cmp si, 0x20
jne 0x405080
mov dword [0x4b92a8], 0x10000
jmp 0x405099
cmp si, 0x40
jne 0x405099
mov dword [0x4b92a8], 0x20000
jmp 0x405099
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [0x4b92a8]
pop edi
pop ebx
mov ecx, dword [esp + 0x134]
pop esi
pop ebp
xor ecx, esp
call fcn.0043f4b7
add esp, 0x130
ret
Function at 0x4050c0
Capabilities:
Get session user name

Disassembly:
sub esp, 0x210
mov eax, dword [0x4b6170]
xor eax, esp
mov dword [esp + 0x20c], eax
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0xe]
push ecx
mov word [esp + 0x10], ax
call fcn.00446600
add esp, 0xc
lea edx, [esp]
push edx
lea eax, [esp + 8]
push eax
mov dword [esp + 8], 0x104
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea ecx, [esp + 4]
push str.SYSTEM
push ecx
call fcn.0043ff65
mov ecx, dword [esp + 0x214]
add esp, 8
neg eax
sbb eax, eax
xor ecx, esp
inc eax
call fcn.0043f4b7
add esp, 0x210
ret

Function at 0x4051c0
Capabilities:
Create thread

Disassembly:
push ecx
push ebx
lea eax, [esi + 0x14]
push edi
push eax
xor ebx, ebx
mov dword [esp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esi + 0xc], 0x3e8
mov dword [esi + 0x10], ebx
cmp dword [esi + 8], ebx
jne 0x4051f1
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 8], eax
cmp eax, ebx
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x40524e
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x405219
push 1
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x405219
mov eax, dword [esi + 4]
push eax
call edi
mov dword [esi + 4], ebx
cmp dword [esi + 4], ebx
jne 0x405237
push ebx
push ebx
push esi
push 0x405280
push ebx
push ebx
call fcn.004406d0
add esp, 0x18
mov dword [esi + 4], eax
cmp eax, ebx
je 0x40524e
mov ecx, dword [esp + 8]
push ecx
mov byte [esi + 0x2c], 1
mov bl, 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov al, bl
pop ebx
pop ecx
ret
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x40525b
push eax
call edi
mov dword [esi + 8], ebx
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x405268
push eax
call edi
mov dword [esi + 4], ebx
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov al, bl
pop ebx
pop ecx
ret
Function at 0x406e40
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
mov esi, eax
mov eax, dword [esi]
mov ecx, dword [esi + 8]
push eax
push 1
push ecx
push edi
call fcn.00440435
mov ecx, dword [esi + 8]
add esp, 0x10
cmp eax, 1
mov eax, ecx
sete bl
cdq
idiv dword [esi + 0x18]
mov byte [esp + 0x12], bl
mov dword [esi + 0x1c], eax
test bl, bl
je 0x406fb9
add dword [esi + 0x14], ecx
cmp dword [esi + 0x54], 8
push 0xffffffffffffffff
push eax
push 0x18
push ecx
mov ecx, esp
jb 0x406e93
mov eax, dword [esi + 0x40]
jmp 0x406e96
lea eax, [esi + 0x40]
mov dword [ecx], eax
push ecx
mov eax, esp
mov dword [eax], str.read
lea eax, [esi + 0x20]
push eax
mov dword [esp + 0x2c], eax
call fcn.00405460
mov ecx, dword [esi + 0x18]
mov ebx, dword [esi + 0x1c]
add esp, 0x18
xor ebp, ebp
xor eax, eax
cmp ecx, 1
sete byte [esp + 0x13]
test ebx, ebx
je 0x406f54
xor edx, edx
dec ebx
cmp byte [esp + 0x13], dl
je 0x406ed8
cmp byte [edi], dl
jmp 0x406edc
cmp word [edi], 0
sete dl
test edx, edx
je 0x406f06
test eax, eax
je 0x406eff
cmp edi, eax
je 0x406eff
imul ecx, ebp
mov edx, edi
sub edx, eax
push edx
push eax
sub eax, ecx
push eax
call fcn.00441040
add esp, 0xc
mov ecx, dword [esi + 0x18]
lea eax, [ecx + edi]
inc ebp
add edi, ecx
test ebx, ebx
jne 0x406ecb
test eax, eax
je 0x406f29
cmp edi, eax
je 0x406f29
mov ecx, dword [esi + 0x18]
imul ecx, ebp
sub edi, eax
push edi
push eax
sub eax, ecx
push eax
call fcn.00441040
add esp, 0xc
test ebp, ebp
je 0x406f54
mov edx, dword [esp + 0x14]
push 0xffffffffffffffff
push ebp
push 1
push ecx
mov eax, esp
push ecx
mov dword [eax], 0
mov eax, esp
push edx
mov dword [eax], str.nulls_removed
call fcn.00405460
add esp, 0x18
sub dword [esi + 0x1c], ebp
cmp dword [esi + 0x18], 1
jle 0x406fab
test byte [esi + 4], 0x80
je 0x406fab
mov esi, dword [esi + 0x1c]
test esi, esi
je 0x406f86
jmp 0x406f70
mov ecx, dword [esp + 0x1c]
movzx eax, word [ecx + esi*2 - 2]
dec esi
rol ax, 8
mov word [ecx + esi*2], ax
test esi, esi
jne 0x406f70
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push ecx
mov eax, esp
mov dword [eax], 0
push ecx
mov eax, esp
mov dword [eax], str.endian_swap
mov eax, dword [esp + 0x28]
push eax
call fcn.00405460
add esp, 0x18
mov al, byte [esp + 0x12]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 4
push esi
call fcn.00406c20
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 8
ret 4
Function at 0x4074d0
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
mov esi, eax
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
imul ecx, eax
push edi
mov dword [esi + 8], ecx
test ebp, ebp
jne 0x4074ec
mov ebp, edx
mov ecx, dword [esi + 4]
xor edi, edi
test cl, cl
jns 0x407566
test edx, edx
jne 0x407525
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0043cdff
mov edi, eax
mov eax, dword [esi + 0x1c]
add eax, eax
push eax
push ebp
push edi
call fcn.00444b20
add esp, 0x10
mov edx, edi
mov ebp, edi
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x407542
lea esp, [esp]
movzx ecx, word [edx + eax*2 - 2]
dec eax
rol cx, 8
mov word [edx + eax*2], cx
test eax, eax
jne 0x407530
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push ecx
mov eax, esp
push ecx
mov dword [eax], 0
mov eax, esp
lea ecx, [esi + 0x20]
push ecx
mov dword [eax], str.endian_swap
call fcn.00405460
add esp, 0x18
mov edx, dword [esi]
mov eax, dword [esi + 8]
push edx
push 1
push eax
push ebp
call fcn.00440fb6
add esp, 0x10
cmp eax, 1
sete bl
test edi, edi
je 0x40758b
push edi
call fcn.004400c4
add esp, 4
test bl, bl
je 0x4075ce
mov edx, dword [esi + 0x1c]
mov ecx, dword [esi + 8]
add dword [esi + 0x14], ecx
cmp dword [esi + 0x54], 8
push 0xffffffffffffffff
push edx
push 0x18
push ecx
mov ecx, esp
jb 0x4075ab
mov eax, dword [esi + 0x40]
jmp 0x4075ae
lea eax, [esi + 0x40]
push ecx
mov dword [ecx], eax
mov eax, esp
add esi, 0x20
push esi
mov dword [eax], str.write
call fcn.00405460
add esp, 0x18
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
ret 4
push esi
call fcn.00406c20
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
ret 4
Function at 0x408930
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x4925c9
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4b6170]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x30]
xor esi, esi
mov dword [esp + 0x18], esi
lea edi, [ebp + 4]
xor eax, eax
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], esi
mov dword [esp + 0x1c], ebp
mov word [edi], ax
mov dword [esp + 0x28], esi
mov eax, dword [esp + 0x34]
mov dword [esp + 0x18], 1
mov ebx, eax
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x408990
sub eax, edx
mov esi, dword [ebp + 0x14]
sar eax, 1
mov ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [ecx + eax + 7]
cmp esi, eax
ja 0x4089e1
cmp dword [ebp + 0x18], eax
je 0x4089e1
push 1
push eax
mov eax, ebp
call fcn.004026d0
test al, al
je 0x4089e1
cmp dword [ebp + 0x18], 8
mov dword [ebp + 0x14], esi
jb 0x4089db
mov edi, dword [edi]
xor ecx, ecx
mov word [edi + esi*2], cx
movzx eax, word [ebx]
test ax, ax
je 0x408afb
mov esi, dword [esp + 0x38]
and esi, 0x100
mov dword [esp + 0x14], esi
test esi, esi
je 0x408a18
lea edx, [eax - 0x22]
cmp dx, 0x1c
ja 0x408ae1
movzx ecx, ax
movsx edi, byte [ecx + 0x4abed6]
jmp 0x408a2f
lea edx, [eax - 0x26]
cmp dx, 0x18
ja 0x408ae1
movzx ecx, ax
movsx edi, byte [ecx + 0x4abef2]
test edi, edi
je 0x408ae1
test byte [esp + 0x38], 8
je 0x408ab7
cmp ax, 0x26
jne 0x408ab7
movzx eax, word [ebx + 2]
lea esi, [ebx + 2]
lea edx, [eax - 0x23]
cmp dx, 0x57
ja 0x408a62
movzx ecx, ax
movsx ecx, byte [ecx + 0x4abf15]
test ecx, ecx
jne 0x408a68
cmp ax, 0x7f
jbe 0x408ab7
movzx eax, word [esi + 2]
add esi, 2
cmp ax, 0x3b
je 0x408a9f
lea edx, [eax - 0x2d]
cmp dx, 0x4d
ja 0x408a8c
movzx ecx, ax
movsx ecx, byte [ecx + 0x4abf6b]
test ecx, ecx
jne 0x408a92
cmp ax, 0x7f
jbe 0x408ab7
movzx eax, word [esi + 2]
add esi, 2
cmp ax, 0x3b
jne 0x408a75
mov eax, esi
sub eax, ebx
sar eax, 1
inc eax
push eax
push ebx
mov eax, ebp
call fcn.0040bbe0
mov ebx, esi
mov esi, dword [esp + 0x14]
jmp 0x408aeb
mov edx, dword [edi*4 + 0x4b7c98]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408ac3
sub eax, esi
sar eax, 1
push eax
push edx
mov eax, ebp
call fcn.0040bbe0
mov esi, dword [esp + 0x14]
jmp 0x408aeb
push 1
push ebx
mov eax, ebp
call fcn.0040bbe0
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
jne 0x4089fb
mov eax, ebp
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret