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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
mov eax, dword [0x52fe80]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
push 0
mov dword [ebp - 0x208], edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edx, dword [0x55d814]
mov esi, eax
test edx, edx
movzx ecx, di
push str.BINDATA
cmovne esi, edx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x44cb7a
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x44cb74
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x44cb74
push edi
push eax
call dword [sym.imp.SHLWAPI.dll_SHCreateMemStream]
push 0x10
mov edi, eax
call dword [sym.imp.gdiplus.dll_GdipAlloc]
mov esi, eax
test esi, esi
je 0x44cb64
lea ecx, [esi + 4]
mov dword [esi], 0x4f9a50
and dword [ecx], 0
push ecx
push edi
call dword [sym.imp.gdiplus.dll_GdipLoadImageFromStream]
mov dword [esi + 8], eax
jmp 0x44cb66
xor esi, esi
test edi, edi
je 0x44cb70
mov ecx, dword [edi]
push edi
call dword [ecx + 8]
mov eax, esi
jmp 0x44cbd0
mov edi, dword [ebp - 0x208]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x44cbce
xor eax, eax
push 0x1fc
push eax
mov word [ebp - 0x204], ax
lea eax, [ebp - 0x202]
push eax
call fcn.004bf240
push esi
push edi
lea eax, [ebp - 0x204]
push str.Function:__s__image_id:_d__Last_error:__d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x1c
lea eax, [ebp - 0x204]
push 0
push str.Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc1bd
mov esp, ebp
pop ebp
ret

Function at 0x450035
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov eax, dword [0x52fe80]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x55dc5c], 0
push esi
je 0x450059
xor eax, eax
jmp 0x4500e6
mov al, byte [0x55d80d]
xor esi, esi
movzx ecx, al
inc esi
test al, al
mov dword [0x556be0], 0x4bc2f0
lea eax, [ebp - 0x198]
mov dword [0x556bf0], 0x4bbc6e
push eax
cmove ecx, esi
mov dword [0x556be8], 0x4c048f
push 0x101
mov dword [0x556be4], 0x4c54db
mov dword [0x556bec], 0x4bc2b0
mov byte [0x55d80d], cl
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4500e3
mov eax, dword [ebp - 0x198]
cmp al, 1
jne 0x4500dd
shr eax, 8
cmp al, 1
jne 0x4500dd
mov dword [0x55dc5c], esi
mov dword [0x55dc58], 3
jmp 0x450052
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004bc1bd
mov esp, ebp
pop ebp
ret
Function at 0x4536d7
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
xor ecx, ecx
lea eax, [esi + edx]
mov edx, 0x1505
mov edi, eax
sub edi, esi
cmp esi, eax
cmova edi, ecx
test edi, edi
je 0x453703
movsx ecx, byte [esi]
imul edx, edx, 0x21
xor edx, ecx
inc esi
inc ebx
cmp ebx, edi
jb 0x4536f5
pop edi
pop esi
mov eax, edx
pop ebx
ret

Function at 0x457699
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, ecx
xor eax, eax
cmp edx, dword [edi + 0xa4]
sete al
cmp byte [eax + edi + 0xb0], 0
jne 0x4576e7
cmp dword [edi + 0x168], 0
je 0x4576c4
or esi, 0xffffffff
jmp 0x4576da
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_send]
mov esi, eax
cmp esi, 0xffffffff
jne 0x457704
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2733
jne 0x4576eb
xor esi, esi
jmp 0x457704
mov edx, eax
mov ecx, edi
call fcn.00464444
push eax
push str.Send_failure:__s
push dword [edi]
call fcn.00457554
add esp, 0xc
mov eax, dword [ebp + 0x10]
xor ecx, ecx
push 0x37
cmp esi, 0xffffffff
mov dword [eax], esi
pop eax
pop edi
cmovne eax, ecx
pop esi
pop ecx
pop ebp
ret

Function at 0x4577f8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov eax, dword [esi + 0x88]
test eax, eax
je 0x45781a
push dword [esi + 0x14]
push dword [ebp + 0xc]
push dword [ebp + 8]
push edx
push esi
call eax
add esp, 0x14
jmp 0x457847
cmp edx, 2
ja 0x457845
push dword [esi + 0x10]
push 1
push 2
push dword [edx*4 + 0x50eabc]
call fcn.004c2abe
push dword [esi + 0x10]
push 1
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004c2abe
add esp, 0x20
xor eax, eax
pop esi
pop ebp
ret
Function at 0x45ad60
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x52fe80]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, ecx
push ebx
push esi
push edi
mov esi, dword [eax]
mov ebx, dword [eax + 0xa4]
mov dword [ebp - 0x18], eax
call fcn.00462763
push edx
push eax
call fcn.00462763
push edx
push eax
call fcn.00462785
mov ecx, 0x3e8
cdq
idiv ecx
mov ecx, dword [esi + 0x9c]
add esp, 0x10
test ecx, ecx
jne 0x45adb2
mov ecx, dword [esi + 0x98]
test ecx, ecx
je 0x45adcc
sub ecx, eax
test ecx, ecx
jg 0x45adcc
push str.Timed_out_before_server_could_connect_to_us
push esi
call fcn.00457554
pop ecx
pop ecx
push 0x1c
jmp 0x45ae77
push 0x3c
test ecx, ecx
pop eax
cmovne eax, ecx
or edx, 0xffffffff
imul eax, eax, 0x3e8
mov ecx, ebx
push eax
call fcn.004628c5
pop ecx
cmp eax, 0xffffffff
je 0x45ae68
test eax, eax
je 0x45ae61
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0x10
push eax
lea eax, [ebp - 0x14]
or edi, 0xffffffff
push eax
push ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x45ae1d
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
cmp edi, 0xffffffff
jne 0x45ae30
push str.Error_accept__ing_server_connect
jmp 0x45ae6d
push str.Connection_accepted_from_server_n
push esi
call fcn.004574e5
mov eax, dword [ebp - 0x18]
pop ecx
pop ecx
mov dword [ebp - 0x18], 1
mov dword [eax + 0xa4], edi
lea eax, [ebp - 0x18]
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
jmp 0x45ae78
push str.Timeout_while_waiting_for_server_connect
jmp 0x45ae6d
push str.Error_while_waiting_for_server_connect
push esi
call fcn.00457554
pop ecx
pop ecx
push 0x1e
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc1bd
mov esp, ebp
pop ebp
ret
Function at 0x45c488
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov ebx, edx
mov dword [ebp - 4], 0x64
mov eax, ebx
cdq
idiv dword [ebp - 4]
push esi
push edi
mov edi, ecx
xor esi, esi
mov ecx, dword [edi]
cmp eax, 2
je 0x45c4bc
push str.Couldnt_set_desired_mode
push ecx
call fcn.00457554
pop ecx
pop ecx
push 0x11
pop eax
jmp 0x45c510
cmp ebx, 0xc8
je 0x45c4d3
push ebx
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
push ecx
call fcn.004574e5
add esp, 0xc
mov eax, dword [ebp + 8]
cmp eax, 0x10
jne 0x45c4e4
mov ecx, edi
call fcn.0045ba53
jmp 0x45c50c
cmp eax, 0x11
jne 0x45c4f2
mov ecx, edi
call fcn.0045ba93
jmp 0x45c50c
cmp eax, 0x12
jne 0x45c4fb
push 0xa
jmp 0x45c502
cmp eax, 0x13
jne 0x45c50e
push 0xb
mov dl, 1
mov ecx, edi
call fcn.0045bd43
pop ecx
mov esi, eax
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x45ebed
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov eax, dword [0x52fe80]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0x198]
mov esi, ecx
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x45ec27
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.00457554
add esp, 0xc
jmp 0x45ec4f
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x198]
cmp al, 2
jne 0x45ec42
shr eax, 8
test al, al
jne 0x45ec42
xor eax, eax
jmp 0x45ec52
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.00457554
pop ecx
pop ecx
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004bc1bd
mov esp, ebp
pop ebp
ret

Function at 0x45f4c0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x918
mov eax, dword [0x52fe80]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, ecx
push esi
mov dword [ebp - 0x90c], eax
push edi
mov esi, dword [eax + 0x16c]
mov ecx, dword [eax]
mov dword [ebp - 0x910], ecx
mov eax, dword [esi + 0x1ab0]
sub eax, dword [esi + 0x1aac]
add eax, 2
push eax
lea eax, [esi + 0x18ac]
push eax
push 0x3c
pop edx
call fcn.0045f0b4
mov eax, dword [esi + 0x1aac]
pop ecx
pop ecx
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x1aac], eax
cmp ecx, 0x18
je 0x45f626
cmp ecx, 0x23
je 0x45f604
cmp ecx, 0x27
jne 0x45f69c
push 0
push ecx
push 0xfa
push 0xff
push str._c_c_c_c
lea eax, [ebp - 0x908]
push 0x800
push eax
call fcn.0045ab3e
mov esi, dword [esi + 0x18a8]
add esp, 0x1c
push 4
pop edi
jmp 0x45f5d3
push dword [esi]
call fcn.004c80b0
inc eax
add eax, edi
mov dword [ebp - 0x914], eax
pop ecx
cmp eax, 0x7fa
jae 0x45f5d0
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x108]
push eax
push str._127_____127s
push dword [esi]
call fcn.004c187d
lea eax, [ebp - 0x88]
push eax
push 1
lea eax, [ebp - 0x108]
push eax
push 0
mov eax, 0x800
sub eax, edi
push str._c_s_c_s
push eax
lea eax, [ebp - 0x908]
add eax, edi
push eax
call fcn.0045ab3e
mov edi, dword [ebp - 0x914]
add esp, 0x2c
mov esi, dword [esi + 4]
test esi, esi
jne 0x45f568
push 0xf0
push 0xff
mov eax, 0x800
sub eax, edi
push str._c_c
push eax
lea eax, [ebp - 0x908]
add eax, edi
push eax
call fcn.0045ab3e
add esp, 0x14
add edi, 2
jmp 0x45f665
add esi, 0x1828
push esi
call fcn.004c80b0
pop ecx
push 0xf0
lea edi, [eax + 6]
mov eax, 0xff
push eax
push esi
push 0
push 0x23
jmp 0x45f646
add esi, 0x1808
push esi
call fcn.004c80b0
pop ecx
push 0xf0
lea edi, [eax + 6]
mov eax, 0xff
push eax
push esi
push 0
push 0x18
push 0xfa
push eax
push str._c_c_c_c_s_c_c
lea eax, [ebp - 0x908]
push 0x800
push eax
call fcn.0045ab3e
add esp, 0x28
push 0
push edi
lea eax, [ebp - 0x908]
push eax
mov eax, dword [ebp - 0x90c]
push dword [eax + 0xa0]
call dword [sym.imp.WS2_32.dll_send]
mov ecx, dword [ebp - 0x910]
lea eax, [edi - 2]
push eax
lea eax, [ebp - 0x906]
push eax
push 0x3e
pop edx
call fcn.0045f0b4
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004bc1bd
mov esp, ebp
pop ebp
ret
Function at 0x45fe60
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x52fe80]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x124], edx
push esi
push edi
mov dword [ebp - 0x128], ebx
mov edi, dword [ebx]
push dword [edi + 0x74]
call fcn.004c80b0
pop ecx
mov ecx, 0xff
cmp eax, ecx
jae 0x45ffd3
xor eax, eax
push ecx
push eax
mov dword [ebp - 0x11c], eax
mov byte [ebp - 0x108], al
lea eax, [ebp - 0x107]
push eax
call fcn.004bf240
mov esi, dword [sym.imp.WS2_32.dll_inet_addr]
add esp, 0xc
push dword [edi + 0x74]
call esi
mov edx, dword [edi + 0x74]
lea eax, [ebp - 0x11c]
push eax
push 0
mov ecx, ebx
call fcn.00453515
pop ecx
pop ecx
cmp eax, 1
jne 0x45feed
lea edx, [ebp - 0x11c]
mov ecx, ebx
call fcn.00461d1c
mov ebx, dword [ebp - 0x11c]
test ebx, ebx
je 0x45ff08
push dword [edi + 0x74]
lea eax, [ebp - 0x108]
push eax
call fcn.004ebff0
pop ecx
pop ecx
cmp byte [ebp - 0x108], 0
jne 0x45ff1e
push dword [edi + 0x74]
push str.Couldnt_bind_to__s
jmp 0x45ffca
lea eax, [ebp - 0x108]
push eax
push str.We_bind_local_end_to__s_n
push edi
call fcn.004574e5
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
call esi
cmp eax, 0xffffffff
je 0x45ffbe
test ebx, ebx
je 0x45ffbe
mov esi, dword [ebx]
mov edx, ebx
mov ecx, edi
call fcn.00453665
push dword [esi + 0x10]
push dword [esi + 0x14]
mov esi, dword [ebp - 0x124]
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x45ff9d
lea eax, [ebp - 0x120]
mov dword [ebp - 0x120], 0x10
push eax
lea eax, [ebp - 0x118]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x45ff99
push str.getsockname___failed
push edi
call fcn.00457554
pop ecx
pop ecx
jmp 0x45ffd3
xor eax, eax
jmp 0x45ffd6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x128]
mov edx, eax
mov dword [edi + 0x8318], eax
call fcn.00464444
push eax
push str.bind_failure:__s
jmp 0x45ffca
lea eax, [ebp - 0x108]
push eax
push str.couldnt_find_my_own_IP_address___s_
push edi
call fcn.00457554
add esp, 0xc
push 0x2d
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc1bd
mov esp, ebp
pop ebp
ret

Function at 0x4600b9
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
mov edi, ecx
push 4
mov esi, dword [edi]
movzx eax, byte [esi + 0x1b6]
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 1
push 6
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x460103
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov ecx, edi
call fcn.00464444
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004574e5
add esp, 0xc
jmp 0x460110
push str.TCP_NODELAY_set_n
push esi
call fcn.004574e5
pop ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x460116
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x52fe80]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push dword [edx + 0xc]
mov eax, ecx
mov dword [ebp - 0x8c], edx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x94], ecx
push dword [eax + 0x28]
mov edi, dword [eax]
push dword [edx + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x4602e7
mov eax, dword [ebp - 0x94]
lea edx, [ebp - 0x88]
mov ecx, dword [ebp - 0x8c]
xor ebx, ebx
push 0x80
mov byte [eax], bl
call fcn.004533dd
pop ecx
lea eax, [ebp - 0x88]
push eax
push str.__Trying__s...
push edi
call fcn.004574e5
add esp, 0xc
cmp byte [edi + 0x1b6], bl
je 0x4601aa
mov ecx, dword [ebp - 0x90]
mov edx, esi
call fcn.004600b9
mov ecx, dword [ebp - 0x90]
mov eax, dword [ecx]
cmp dword [eax + 0x74], ebx
je 0x4601c6
mov edx, esi
call fcn.0045fe60
test eax, eax
jne 0x4602e0
lea eax, [ebp - 0x98]
mov dword [ebp - 0x98], 1
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [ebp - 0x90]
cmp dword [eax + 0x28], 1
jne 0x460204
mov eax, dword [ebp - 0x8c]
push dword [eax + 0x10]
push dword [eax + 0x14]
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x460294
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x8c], eax
cmp eax, 0xb
je 0x460288
cmp eax, 0x2732
jle 0x46022c
cmp eax, 0x2734
jle 0x460288
mov ecx, dword [ebp - 0x90]
mov edx, eax
call fcn.00464444
push eax
lea eax, [ebp - 0x88]
push eax
push str.Failed_to_connect_to__s:__s
push edi
call fcn.00457554
mov eax, dword [ebp - 0x8c]
add esp, 0x10
mov dword [edi + 0x8318], eax
lea edx, [ebp - 0x8c]
mov ecx, esi
call fcn.0045ffe7
test ebx, ebx
jne 0x4602a6
test al, al
je 0x4602ba
mov eax, dword [ebp - 0x94]
push str.connected_n
push edi
mov byte [eax], 1
call fcn.004574e5
pop ecx
pop ecx
jmp 0x4602a2
mov edx, dword [ebp + 8]
mov ecx, esi
call fcn.0045fe3d
mov ebx, eax
cmp ebx, 1
jne 0x46025b
cmp dword [edi + 0x2d8], 2
jne 0x46025b
mov eax, esi
jmp 0x4602ea
cmp ebx, 1
jne 0x4602ba
push str.Timeout_n
push edi
call fcn.004574e5
pop ecx
pop ecx
jmp 0x4602e0
mov edx, dword [ebp - 0x8c]
mov ecx, dword [ebp - 0x90]
mov dword [edi + 0x8318], edx
call fcn.00464444
push eax
push 0x5158b8
push edi
call fcn.004574e5
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc1bd
mov esp, ebp
pop ebp
ret
Function at 0x4605f6
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, ecx
mov esi, str.netascii
push 3
mov eax, dword [edi + 0xc]
mov ebx, dword [eax]
mov ecx, dword [eax + 0x50]
mov eax, str.octet
mov dword [ebp - 4], ecx
pop ecx
cmp byte [ebx + 0x18c], 0
cmove esi, eax
mov dword [ebp - 8], esi
sub edx, 0
je 0x4606b0
sub edx, ecx
je 0x460681
dec edx
je 0x460652
dec edx
je 0x4606c2
dec edx
je 0x4606b0
push str.tftp_send_first:_internal_error_n
push ebx
call fcn.00457554
pop ecx
pop ecx
jmp 0x4607aa
push str.Connected_for_transmit
push 0x5158b8
push ebx
call fcn.004574e5
add esp, 0xc
mov dword [edi], 2
mov ecx, edi
call fcn.004604c7
push 4
pop edx
mov ecx, edi
call fcn.00460926
jmp 0x4607aa
push str.Connected_for_receive
push 0x5158b8
push ebx
call fcn.004574e5
add esp, 0xc
mov dword [edi], 1
mov ecx, edi
call fcn.004604c7
push 3
pop edx
mov ecx, edi
call fcn.004607b1
jmp 0x4607aa
inc dword [edi + 0x14]
mov eax, dword [edi + 0x14]
cmp eax, dword [edi + 0x1c]
jle 0x4606c9
mov dword [edi + 8], 9
mov dword [edi], ecx
jmp 0x4607aa
cmp byte [ebx + 0x199], 0
je 0x460729
push 2
call dword [sym.imp.WS2_32.dll_htons]
push dword [ebp - 4]
mov word [edi + 0x268], ax
call fcn.004c80b0
pop ecx
mov ecx, dword [ebp - 4]
mov edx, eax
call fcn.00462809
mov dword [ebp - 4], eax
lea ecx, [edi + 0x26c]
mov eax, dword [edi + 0xc]
mov dword [eax + 0x1fc], ecx
mov ecx, dword [ebx + 0xa8]
mov eax, ecx
mov edx, dword [ebx + 0xac]
and eax, edx
cmp eax, 0xffffffff
je 0x460738
push edx
push ecx
mov ecx, ebx
call fcn.004611ea
add esp, 8
jmp 0x460738
push 1
call dword [sym.imp.WS2_32.dll_htons]
mov word [edi + 0x268], ax
push 0
push esi
mov esi, dword [ebp - 4]
lea eax, [edi + 0x26a]
push 0
push esi
push str._s_c_s_c
push eax
call fcn.0045acaa
push esi
call fcn.004c80b0
add esp, 0x1c
mov esi, eax
push dword [ebp - 8]
call fcn.004c80b0
pop ecx
lea ecx, [eax + 4]
mov eax, dword [edi + 0xc]
add ecx, esi
mov eax, dword [eax + 0x10]
push dword [eax + 0x10]
push dword [eax + 0x14]
lea eax, [edi + 0x268]
push 0
push ecx
push eax
push dword [edi + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x4607aa
call fcn.004c49cf
push dword [eax]
call fcn.004ebf83
pop ecx
push eax
push 0x5158b8
push ebx
call fcn.00457554
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4607b1
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov ebx, ecx
push edi
push 3
pop edi
mov eax, dword [ebx + 0xc]
mov esi, dword [eax]
mov dword [ebp - 4], esi
sub edx, edi
je 0x460845
dec edx
dec edx
je 0x4607fa
dec edx
je 0x4607d7
push str.tftp_rx:_internal_error
jmp 0x460832
inc dword [ebx + 0x14]
push dword [ebx + 0x14]
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push esi
call fcn.004574e5
mov eax, dword [ebx + 0x14]
add esp, 0xc
cmp eax, dword [ebx + 0x1c]
jle 0x460801
mov dword [ebx + 8], 8
mov dword [ebx], edi
jmp 0x460907
push dword [ebx + 0x58]
lea eax, [ebx + 0x48]
push eax
push 0
push 4
lea eax, [ebx + 0x268]
push eax
push dword [ebx + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x460907
call fcn.004c49cf
push dword [eax]
call fcn.004ebf83
pop ecx
push eax
push 0x5158b8
push esi
call fcn.00457554
add esp, 0xc
jmp 0x460907
movzx eax, word [ebx + 0x66]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
movzx eax, word [ebx + 0x30]
inc eax
cmp eax, edi
je 0x46088f
push edi
push str.Received_unexpected_DATA_packet_block__d_n
push esi
call fcn.004574e5
add esp, 0xc
inc dword [ebx + 0x14]
mov eax, dword [ebx + 0x14]
cmp eax, dword [ebx + 0x1c]
jle 0x46088f
movzx eax, word [ebx + 0x30]
inc eax
push eax
push str.tftp_rx:_giving_up_waiting_for_block__d_n
push esi
call fcn.00457554
add esp, 0xc
jmp 0x46091f
and dword [ebx + 0x14], 0
mov esi, dword [sym.imp.WS2_32.dll_htons]
mov word [ebx + 0x30], di
lea edi, [ebx + 0x268]
push 4
call esi
mov word [edi], ax
movzx eax, word [ebx + 0x30]
push eax
call esi
push dword [ebx + 0x58]
mov word [ebx + 0x26a], ax
lea eax, [ebx + 0x48]
push eax
push 0
push 4
push edi
push dword [ebx + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x4608f2
call fcn.004c49cf
push dword [eax]
call fcn.004ebf83
mov esi, dword [ebp - 4]
pop ecx
push eax
push 0x5158b8
push esi
call fcn.00457554
add esp, 0xc
jmp 0x4608f5
mov esi, dword [ebp - 4]
xor eax, eax
inc eax
cmp dword [ebx + 0x5c], 0x204
push 3
pop ecx
cmovl eax, ecx
mov dword [ebx], eax
movzx eax, word [ebx + 0x30]
cdq
shld edx, eax, 9
shl eax, 9
mov dword [esi + 0x1f8], eax
mov dword [esi + 0x1fc], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x460926
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0xc]
mov ebx, dword [eax]
sub edx, 4
je 0x460982
dec edx
je 0x460968
dec edx
je 0x460945
push str.tftp_tx:_internal_error
jmp 0x460a57
inc dword [edi + 0x14]
push dword [edi + 0x14]
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebx
call fcn.004574e5
mov eax, dword [edi + 0x14]
add esp, 0xc
cmp eax, dword [edi + 0x1c]
jle 0x460973
mov dword [edi + 8], 8
mov dword [edi], 3
jmp 0x460a65
push dword [edi + 0x58]
lea eax, [edi + 0x48]
push eax
mov eax, dword [edi + 0x60]
jmp 0x460a2f
movzx eax, word [edi + 0x66]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edx, word [edi + 0x30]
movzx eax, ax
mov ecx, edx
cmp eax, ecx
je 0x4609d6
push ecx
push eax
push str.Received_ACK_for_block__d__expecting__d_n
push ebx
call fcn.004574e5
add esp, 0x10
inc dword [edi + 0x14]
mov eax, dword [edi + 0x14]
cmp eax, dword [edi + 0x1c]
jle 0x460a7d
movzx eax, word [edi + 0x30]
push eax
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
push 0x5158b8
push ebx
call fcn.00457554
add esp, 0x10
jmp 0x460a7d
and dword [edi + 0x14], 0
lea eax, [edx + 1]
mov esi, dword [sym.imp.WS2_32.dll_htons]
push 3
mov word [edi + 0x30], ax
call esi
mov word [edi + 0x268], ax
movzx eax, word [edi + 0x30]
push eax
call esi
cmp word [edi + 0x30], 1
mov edx, 0x200
mov word [edi + 0x26a], ax
jbe 0x460a19
cmp dword [edi + 0x60], edx
jge 0x460a19
mov dword [edi], 3
jmp 0x460a7d
mov ecx, dword [edi + 0xc]
lea esi, [edi + 0x60]
push esi
call fcn.004539f2
pop ecx
push dword [edi + 0x58]
lea eax, [edi + 0x48]
push eax
mov eax, dword [esi]
push 0
add eax, 4
push eax
lea eax, [edi + 0x268]
push eax
push dword [edi + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x460a65
call fcn.004c49cf
push dword [eax]
call fcn.004ebf83
pop ecx
push eax
push 0x5158b8
push ebx
call fcn.00457554
add esp, 0xc
movzx eax, word [edi + 0x30]
cdq
shld edx, eax, 9
shl eax, 9
mov dword [ebx + 0x200], eax
mov dword [ebx + 0x204], edx
pop edi
pop esi
pop ebx
ret