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

Disassembly:
mov eax, 0x44ffff
call fcn.0044f20c
sub esp, 0x278
push ebx
push esi
push edi
xor ebx, ebx
push 0x207
lea eax, [ebp - 0x283]
push ebx
push eax
mov byte [ebp - 0x284], bl
call fcn.0043c7f0
add esp, 0xc
lea eax, [ebp - 0x284]
push eax
push 0x208
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov eax, 0x45edc0
lea ecx, [ebp - 0x60]
call fcn.004027e3
mov esi, eax
lea eax, [ebp - 0x284]
lea ecx, [ebp - 0x44]
mov dword [ebp - 4], ebx
call fcn.004027e3
mov ecx, eax
mov eax, esi
inc ebx
lea esi, [ebp - 0x7c]
mov byte [ebp - 4], bl
call fcn.004033f6
push dword [ebp + 8]
mov edi, eax
lea esi, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.0040344a
pop ecx
push ebx
xor edi, edi
lea esi, [ebp - 0x7c]
call fcn.00402a08
push ebx
lea esi, [ebp - 0x44]
call fcn.00402a08
push ebx
lea esi, [ebp - 0x60]
call fcn.00402a08
cmp dword [ebp - 0x14], 0x10
mov eax, dword [ebp - 0x28]
jae 0x401a38
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
xor edi, edi
lea esi, [ebp - 0x28]
call fcn.00402a08
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, ebx
pop ebx
mov dword fs:[0], ecx
leave
ret 4

Function at 0x401a5d
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
push ebx
xor ebx, ebx
push 0x63
lea eax, [ebp - 0x73]
push ebx
push eax
mov byte [ebp - 0x74], bl
call fcn.0043c7f0
add esp, 0xc
push 0x31
pop eax
mov word [ebp - 4], ax
lea eax, [ebp - 4]
mov dword [ebp - 0xc], 0x64
mov dword [ebp - 0x10], 4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x401a93
sub eax, edx
push eax
push 0x2f
lea eax, [ebp - 4]
push eax
push str.bwefpctmtbtemtbte
call fcn.00401106
add esp, 0x10
lea ecx, [ebp - 8]
push ecx
push 0x20119
push ebx
push eax
push reloc.WS2_32.dll_bind
mov byte [eax + 0x2f], bl
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401afe
push esi
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.WebLicensePublicId
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 8]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, ebx
pop esi
jne 0x401afe
xor eax, eax
inc eax
jmp 0x401b00
xor eax, eax
pop ebx
leave
ret

Function at 0x401ced
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push esi
push dword [0x464bf8]
call dword [sym.imp.USER32.dll_OpenClipboard]
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov eax, dword [0x463828]
lea eax, [eax + eax + 2]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
jne 0x401d1f
pop esi
jmp dword [sym.imp.USER32.dll_CloseClipboard]
cmp dword [0x46382c], 8
mov eax, dword [0x463818]
jae 0x401d32
mov eax, 0x463818
mov ecx, dword [0x463828]
lea ecx, [ecx + ecx + 2]
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
call fcn.0043c360
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
push 0xd
call dword [sym.imp.USER32.dll_SetClipboardData]
pop esi
jmp dword [sym.imp.USER32.dll_CloseClipboard]
Function at 0x401d65
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push esi
push edi
push dword [0x464bf8]
mov esi, eax
call dword [sym.imp.USER32.dll_OpenClipboard]
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov eax, dword [esi + 0x10]
inc eax
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
jne 0x401d96
pop edi
pop esi
jmp dword [sym.imp.USER32.dll_CloseClipboard]
cmp dword [esi + 0x14], 0x10
mov eax, dword [esi + 0x10]
jb 0x401da1
mov esi, dword [esi]
inc eax
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
call fcn.0043c360
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
pop edi
pop esi
jmp dword [sym.imp.USER32.dll_CloseClipboard]
Function at 0x402687
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
xor esi, esi
push esi
push 0x45edf4
push 0xe
push 0x464c00
push 0xe
push str.ARZ54734143603
push esi
push 0x4e4
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
call fcn.00401290
call fcn.00401a5d
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
push eax
push esi
lea eax, [ebp - 4]
push eax
push 0x401b03
push esi
push esi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, dword [sym.imp.USER32.dll_MessageBoxW]
mov dword [ebp - 8], eax
mov ebx, 0x45eba4
cmp eax, esi
jne 0x402700
push 0x100010
push ebx
push 0x45ee30
push dword [0x464bf8]
call edi
cmp dword [ebp - 0x10], esi
jne 0x402717
mov eax, dword [0x465000]
sub eax, dword [0x464ffc]
push 0x464ffc
jmp 0x402727
mov eax, dword [0x464ff0]
sub eax, dword [0x464fec]
push 0x464fec
sar eax, 2
mov dword [0x464bfc], eax
call fcn.00401c6e
mov eax, dword [0x464f90]
sub eax, dword [0x464f8c]
pop ecx
sar eax, 2
cmp eax, dword [0x464bfc]
je 0x40275e
push 0x100010
push ebx
push 0x45eebc
push dword [0x464bf8]
call edi
push 0xffffffffffffffff
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], 0x194
jne 0x402790
push 0x100010
push ebx
push 0x45ef48
push dword [0x464bf8]
call edi
jmp 0x4027af
cmp dword [ebp - 4], esi
je 0x4027af
push esi
push 0x401fac
push dword [0x464bf8]
push 0x67
push dword [0x464b00]
call dword [sym.imp.USER32.dll_DialogBoxParamW]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40cb02
Capabilities:
Hash data using djb2

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea edi, [esi + eax]
mov ebx, 0x1505
jmp 0x40cb24
movzx eax, byte [esi]
push eax
call fcn.0040e130
imul ebx, ebx, 0x21
movsx eax, al
xor ebx, eax
pop ecx
inc esi
cmp esi, edi
jb 0x40cb11
pop edi
pop esi
movzx eax, bl
pop ebx
ret

Function at 0x40e701
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0x10]
call fcn.0040e6f9
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00443ce0
add esp, 0x10
pop ebp
ret

Function at 0x40e8d3
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x40e903
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
pop ebp
ret
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
xor eax, eax
pop ebp
ret

Function at 0x40e965
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp dword [esi + 0x600], edi
je 0x40e9a4
push 1
push esi
call fcn.00410f9e
push dword [esi + 0x594]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call dword [esi + 0x600]
push 0
push esi
mov edi, eax
call fcn.00410f9e
add esp, 0x24
jmp 0x40e9de
mov eax, dword [ebp + 0xc]
test eax, eax
js 0x40e9de
cmp eax, 2
jg 0x40e9de
push dword [esi + 0x590]
imul eax, eax, 3
push 1
add eax, 0x452560
push 2
push eax
call fcn.0043bec2
push dword [esi + 0x590]
push 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.0043bec2
add esp, 0x20
mov eax, edi
pop edi
pop esi
pop ebp
ret

Function at 0x40ee41
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
mov edx, dword [ebx + 0x2c8]
mov ecx, dword [ebx + eax*4 + 0x1b8]
push esi
lea esi, [eax + 0x1e]
shl esi, 4
add esi, ebx
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [edx + 0x40], 3
mov dword [ebp - 4], ecx
je 0x40eee4
cmp dword [ebx + eax*4 + 0x1d0], 0x40ebef
jne 0x40eee4
xor eax, eax
cmp dword [esi], eax
je 0x40ee82
cmp edi, eax
je 0x40eee4
push eax
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
call fcn.0040f0b7
add esp, 0x14
cmp eax, 0xffffffff
je 0x40eee4
test al, 1
je 0x40eee4
cmp dword [esi], 0
jne 0x40eec5
mov eax, dword [ebx]
mov eax, dword [eax + 0x8e4]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [section..data]
and dword [esi + 8], 0
and dword [esi + 0xc], 0
mov edi, dword [esi + 4]
pop ecx
mov dword [esi], eax
test eax, eax
je 0x40eee0
mov eax, dword [esi]
add eax, dword [esi + 8]
push 0
push edi
push eax
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x40eee4
add dword [esi + 8], eax
jmp 0x40eee4
and dword [esi + 4], 0
pop edi
pop esi
leave
ret
Function at 0x40eee8
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x462370]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + eax*4 + 0x1b8]
push esi
mov esi, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x88], ecx
call fcn.0040ee41
push 0
push dword [ebp + 0x14]
push edi
push dword [ebp - 0x88]
call dword [sym.imp.WS2_32.dll_send]
and dword [esi], 0
mov edi, eax
cmp edi, 0xffffffff
jne 0x40ef8b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x88], eax
cmp eax, 0x2733
jne 0x40ef55
xor edi, edi
mov dword [esi], 0x51
jmp 0x40ef8b
push 0x80
lea ecx, [ebp - 0x84]
push ecx
push eax
call fcn.00431c8d
push eax
push str.Send_failure:__s
push dword [ebx]
call fcn.0040ea8b
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x88]
mov dword [eax + 0xcac], ecx
add esp, 0x18
mov dword [esi], 0x37
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043c86a
leave
ret
Function at 0x40f7f9
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2d0], 2
jne 0x40f80e
pop ebp
jmp fcn.0040f7b6
xor eax, eax
inc eax
pop ebp
ret

Function at 0x410033
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 4], 0
push ebx
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
test ebx, ebx
je 0x410137
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
push str.LoadLibraryExA
push ebx
call esi
push 0x452738
push dword [ebp + 8]
mov edi, eax
mov dword [ebp - 8], edi
call fcn.0043f806
pop ecx
pop ecx
test eax, eax
je 0x41008d
test edi, edi
je 0x410082
push 8
jmp 0x4100a2
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x4100a9
test edi, edi
je 0x4100b1
push str.AddDllDirectory
push ebx
call esi
test eax, eax
je 0x4100b1
push 0x800
push 0
push dword [ebp + 8]
call edi
mov dword [ebp - 4], eax
jmp 0x410132
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0
push 0
call ebx
mov edi, eax
test edi, edi
je 0x410132
push dword [ebp + 8]
call fcn.0043bce0
lea eax, [eax + edi + 1]
push eax
call dword [section..data]
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x41012a
push edi
push esi
call ebx
test eax, eax
je 0x41012a
push 0x45edc0
push esi
call fcn.0043bce0
pop ecx
add eax, esi
push eax
call fcn.0043ce20
pop ecx
pop ecx
push dword [ebp + 8]
push esi
call fcn.0043bce0
pop ecx
add eax, esi
push eax
call fcn.0043ce20
cmp dword [ebp - 8], 0
pop ecx
pop ecx
je 0x410120
push 8
push 0
push esi
call dword [ebp - 8]
jmp 0x410127
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 4], eax
push esi
call dword [0x462004]
pop ecx
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x41013a
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x462370]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push 2
pop ebx
test byte [ebp + 8], bl
je 0x410190
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x410173
mov eax, ebx
jmp 0x4101f5
cmp byte [ebp - 0x194], bl
jne 0x410188
mov eax, dword [ebp - 0x194]
shr eax, 8
cmp al, bl
je 0x410190
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x41016c
call fcn.004328ae
test eax, eax
jne 0x4101f5
push str.iphlpapi.dll
call fcn.00410033
pop ecx
mov dword [0x463aa4], eax
test eax, eax
je 0x4101c2
push str.if_nametoindex
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4101c2
mov dword [0x463aa8], eax
push 3
push ebx
push 0
push 6
call fcn.0040fed6
add esp, 0x10
test eax, eax
je 0x4101ec
push 0x4650a0
mov dword [0x4650a8], 1
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
jmp 0x4101f3
and dword [0x4650a8], 0
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0043c86a
leave
ret
Function at 0x412a55
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x462370]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [esi + 0xa90]
shr eax, 0xc
and eax, 1
push 4
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 8
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x412a9d
push ebx
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.0040e9e4
add esp, 0xc
jmp 0x412b0a
push dword [esi + 0xa50]
mov dword [ebp - 0x10], 1
call fcn.0040e6e3
imul eax, eax, 0x3e8
push dword [esi + 0xa54]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.0040e6e3
imul eax, eax, 0x3e8
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
xor eax, eax
push eax
push eax
lea ecx, [ebp - 0x18]
push ecx
push eax
push eax
push 0xc
lea eax, [ebp - 0x10]
push eax
push 0x98000004
push ebx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x412b0a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.0040e9e4
add esp, 0x10
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043c86a
leave
ret
Function at 0x413177
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
mov eax, dword [0x462370]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, dword [ebp + 8]
cmp dword [edi + 0x90], 2
mov dword [ebp - 0x18c], edi
je 0x41331d
mov eax, dword [edi + 0x2a4]
push ebx
push esi
test al, 2
jne 0x413314
test eax, 0x8000000
jne 0x413314
mov ebx, dword [edi]
lea eax, [ebp - 0x188]
push eax
lea eax, [ebp - 0x184]
push eax
push dword [ebp + 0xc]
mov esi, 0x80
mov dword [ebp - 0x190], ebx
mov dword [ebp - 0x188], esi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x413209
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push esi
lea eax, [ebp - 0x84]
push eax
push edi
call fcn.00431c8d
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
jmp 0x413259
push esi
lea eax, [ebp - 0x104]
push 0
push eax
mov dword [ebp - 0x188], esi
call fcn.0043c7f0
add esp, 0xc
lea eax, [ebp - 0x188]
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x41325f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push esi
lea eax, [ebp - 0x84]
push eax
push edi
call fcn.00431c8d
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
push ebx
jmp 0x413304
lea ebx, [edi + 0x10a]
add edi, 0x138
lea esi, [ebp - 0x184]
call fcn.00413123
test eax, eax
jne 0x4132a5
call fcn.0043c9fe
mov esi, eax
call fcn.0043c9fe
mov edi, eax
push 0x80
lea eax, [ebp - 0x84]
push eax
push dword [esi]
call fcn.00431c8d
push eax
push dword [edi]
push str.ssrem_inet_ntop___failed_with_errno__d:__s
jmp 0x4132fe
mov esi, dword [ebp - 0x18c]
push 0x2e
lea eax, [esi + 0x5c]
push ebx
push eax
call fcn.0043c360
lea edi, [esi + 0x16c]
lea ebx, [esi + 0x13c]
add esp, 0xc
lea esi, [ebp - 0x104]
call fcn.00413123
test eax, eax
jne 0x41330e
call fcn.0043c9fe
mov esi, eax
call fcn.0043c9fe
mov edi, eax
push 0x80
lea eax, [ebp - 0x84]
push eax
push dword [esi]
call fcn.00431c8d
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x190]
call fcn.0040ea8b
add esp, 0x1c
jmp 0x41331b
mov edi, dword [ebp - 0x18c]
push edi
call fcn.004130ad
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.0043c86a
leave
ret

Function at 0x41332a
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x462370]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [eax]
push 4
xor eax, eax
lea ecx, [ebp - 0x88]
push ecx
inc eax
push eax
push 6
push dword [ebp + 0xc]
mov dword [ebp - 0x88], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x41338e
push 0x80
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00431c8d
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0040e9e4
add esp, 0x18
jmp 0x41339b
push str.TCP_NODELAY_set_n
push esi
call fcn.0040e9e4
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0043c86a
leave
ret
Function at 0x4133a8
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor eax, eax
push 2
mov dword [ebp - 8], 0x4020
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], 4
pop esi
cmp dword [0x463ac0], eax
jne 0x4133f1
push 3
push esi
push eax
push 6
call fcn.0040fed6
add esp, 0x10
test eax, eax
je 0x4133e7
mov dword [0x463ac0], esi
jmp 0x413435
mov dword [0x463ac0], 1
cmp dword [0x463ac0], esi
je 0x413435
push edi
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
mov edi, 0x1001
push edi
mov esi, 0xffff
push esi
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x413423
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jg 0x413434
push 4
lea eax, [ebp - 8]
push eax
push edi
push esi
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
pop edi
pop esi
leave
ret

Function at 0x413438
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test byte [eax + 0x20c], 1
je 0x413456
push eax
call fcn.0040c235
pop ecx
test eax, eax
jne 0x413472
xor eax, eax
pop ebp
ret
mov eax, dword [eax + 0x1b8]
cmp eax, 0xffffffff
je 0x413452
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
jmp 0x41344e
xor eax, eax
inc eax
pop ebp
ret
Function at 0x418cfc
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x462370]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
mov eax, dword [esi + 0x10]
mov edx, dword [eax]
mov eax, dword [ebp + 8]
push 3
pop ebx
sub eax, ebx
mov dword [ebp - 0x88], edx
je 0x418e52
dec eax
dec eax
je 0x418e0e
dec eax
je 0x418db5
dec eax
je 0x418d55
push str.tftp_rx:_internal_error
push 0x45333c
push edx
call fcn.0040ea8b
add esp, 0xc
push 0x47
jmp 0x418f01
movzx eax, word [esi + 0x40]
inc dword [esi + 0x18]
push dword [esi + 0x18]
inc eax
and eax, 0xffff
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push edx
call fcn.0040e9e4
mov eax, dword [esi + 0x18]
add esp, 0x10
cmp eax, dword [esi + 0x20]
jle 0x418d88
mov dword [esi + 8], 0xffffff9d
jmp 0x418e4b
push dword [esi + 0x148]
lea eax, [esi + 0xc8]
push eax
push 0
push 4
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x418f3a
jmp 0x418ed3
xor eax, eax
and dword [esi + 0x18], eax
mov word [esi + 0x40], ax
push 4
pop ecx
lea eax, [esi + 0x160]
call fcn.00418a70
mov cx, word [esi + 0x40]
lea eax, [esi + 0x160]
call fcn.00418a81
push dword [esi + 0x148]
lea eax, [esi + 0xc8]
push eax
push 0
push 4
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x418ed3
mov dword [esi], 1
jmp 0x418f1e
push 5
pop ecx
lea eax, [esi + 0x160]
call fcn.00418a70
mov cx, word [esi + 0x40]
lea eax, [esi + 0x160]
call fcn.00418a81
push dword [esi + 0x148]
lea eax, [esi + 0xc8]
push eax
push 0
push 4
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [esi], ebx
jmp 0x418f3a
lea eax, [esi + 0x15c]
call fcn.00418aa2
movzx edi, ax
movzx eax, word [esi + 0x40]
lea ecx, [eax + 1]
and ecx, 0xffff
cmp ecx, edi
jne 0x418e77
and dword [esi + 0x18], 0
jmp 0x418e8e
cmp eax, edi
jne 0x418f2a
push edi
push str.Received_last_DATA_packet_block__d_again._n
push edx
call fcn.0040e9e4
add esp, 0xc
push 4
pop ecx
lea eax, [esi + 0x160]
mov word [esi + 0x40], di
call fcn.00418a70
mov cx, word [esi + 0x40]
lea eax, [esi + 0x160]
call fcn.00418a81
push dword [esi + 0x148]
lea eax, [esi + 0xc8]
push eax
push 0
push 4
push dword [esi + 0x160]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x418f04
push 0x80
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00431c8d
push eax
push 0x45333c
push dword [ebp - 0x88]
call fcn.0040ea8b
add esp, 0x18
push 0x37
pop eax
jmp 0x418f3c
mov eax, dword [esi + 0x154]
xor ecx, ecx
add eax, 4
cmp dword [esi + 0x14c], eax
setl cl
lea ecx, [ecx + ecx + 1]
mov dword [esi], ecx
add esi, 0x38
push esi
call fcn.0043f203
pop ecx
jmp 0x418f3a
push ecx
push edi
push str.Received_unexpected_DATA_packet_block__d__expecting_block__d_n
push edx
call fcn.0040e9e4
add esp, 0x10
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043c86a
leave
ret
Function at 0x4195fb
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [esi + 0x10]
push str.Connected_for_receive
push 0x4523bc
push dword [eax]
call fcn.0040e9e4
add esp, 0xc
mov eax, esi
mov dword [esi], 1
call fcn.0041891f
test eax, eax
jne 0x41962e
mov ecx, esi
pop ebp
jmp fcn.00418cfc
pop ebp
ret
Function at 0x4199d5
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x462370]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
mov eax, dword [ebx]
mov esi, dword [ebx + 0x4c0]
push edi
mov dword [ebp - 0x88], eax
lea eax, [ebp - 0x8c]
push eax
mov dword [ebp - 0x8c], 0x80
lea eax, [ebp - 0x84]
push eax
mov eax, dword [esi + 0x154]
push 0
add eax, 4
push eax
push dword [esi + 0x15c]
mov dword [ebp - 0x90], ebx
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x419a6b
push dword [ebp - 0x8c]
lea eax, [ebp - 0x84]
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.0043c360
mov eax, dword [ebp - 0x8c]
add esp, 0xc
mov dword [esi + 0x148], eax
mov edx, dword [esi + 0x14c]
cmp edx, 4
jge 0x419aa0
push str.Received_too_short_packet
push dword [ebp - 0x88]
call fcn.0040ea8b
pop ecx
pop ecx
mov dword [esi + 0xc], 7
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043c86a
leave
ret
lea eax, [esi + 0x15c]
call fcn.00418a93
movzx eax, ax
mov dword [esi + 0xc], eax
sub eax, 3
je 0x419b6d
dec eax
je 0x419b4c
dec eax
je 0x419afe
dec eax
je 0x419ae1
push str.Internal_error:_Unexpected_packet
push 0x45333c
push dword [ebp - 0x88]
call fcn.0040ea8b
add esp, 0xc
jmp 0x419b4c
mov eax, dword [esi + 0x15c]
add edx, 0xfffffffe
push edx
add eax, 2
push eax
push esi
call fcn.00418b21
add esp, 0xc
test eax, eax
je 0x419b4c
jmp 0x419a91
mov ebx, dword [esi + 0x15c]
add edx, 0xfffffffc
lea eax, [esi + 0x15c]
add ebx, 4
mov dword [ebp - 0x94], edx
call fcn.00418aa2
movzx eax, ax
push edx
push ebx
mov dword [esi + 8], eax
call fcn.00418ab2
pop ecx
pop ecx
cmp eax, dword [ebp - 0x94]
jae 0x419b46
push ebx
push str.TFTP_error:__s_n
push dword [ebp - 0x88]
call fcn.0040e9e4
add esp, 0xc
mov ebx, dword [ebp - 0x90]
push ebx
call fcn.0042b18b
pop ecx
test eax, eax
je 0x419a8f
push 5
mov edx, esi
call fcn.00419966
pop ecx
push 0x2a
pop eax
jmp 0x419a91
cmp edx, 4
jle 0x419b4c
lea eax, [esi + 0x15c]
call fcn.00418aa2
movzx ecx, word [esi + 0x40]
inc ecx
cmp cx, ax
jne 0x419b4c
mov eax, dword [esi + 0x15c]
add edx, 0xfffffffc
push edx
add eax, 4
push eax
push 1
push ebx
call fcn.0040ee1a
mov edi, eax
add esp, 0x10
test edi, edi
je 0x419bb7
push 5
mov edx, esi
call fcn.00419966
pop ecx
mov eax, edi
jmp 0x419a91
mov eax, dword [esi + 0x14c]
mov edi, dword [ebp - 0x88]
sub eax, 4
cdq
add dword [edi + 0x98], eax
adc dword [edi + 0x9c], edx
push dword [edi + 0x9c]
push dword [edi + 0x98]
push edi
call fcn.0042a8e2
jmp 0x419adc