joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4481a8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, ecx
cmp byte [edi + 0x24], 0
je 0x4481bc
xor eax, eax
jmp 0x448256
cmp dword [edi + 0x18], 0
je 0x4481b5
push esi
lea esi, [edi + 8]
cmp dword [esi + 0x14], 8
jb 0x4481d0
mov eax, dword [esi]
jmp 0x4481d2
mov eax, esi
push ebx
push 0x510b68
push eax
call fcn.004c2e15
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x448235
push 3
pop ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x44822c
test ebx, ebx
jle 0x448231
dec ebx
push 0xc8
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esi + 0x14], 8
jb 0x44820e
mov eax, dword [esi]
jmp 0x448210
mov eax, esi
push 0x510b68
push eax
call fcn.004c2e15
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x448235
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 4]
cmp eax, 0x20
je 0x4481f1
xor eax, eax
jmp 0x448254
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004c2ccc
push ebx
mov esi, eax
call fcn.004c0ffe
add esp, 0x14
mov eax, esi
add dword [edi + 0x28], esi
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret 0xc

Function at 0x449dab
Capabilities:
Hide graphical window

Disassembly:
push esi
mov esi, ecx
push 0
mov eax, dword [esi + 4]
push dword [eax + 4]
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [esi + 4]
push 0
push 0
push 0x402
push dword [eax + 4]
call dword [sym.imp.USER32.dll_PostMessageW]
pop esi
ret
Function at 0x44c76d
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
mov eax, dword [0x52de80]
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 [0x55b51c]
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 0x44c81e
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x44c818
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x44c818
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 0x44c808
lea ecx, [esi + 4]
mov dword [esi], vtable.Gdiplus::Image.0
and dword [ecx], 0
push ecx
push edi
call dword [sym.imp.gdiplus.dll_GdipLoadImageFromStream]
mov dword [esi + 8], eax
jmp 0x44c80a
xor esi, esi
test edi, edi
je 0x44c814
mov ecx, dword [edi]
push edi
call dword [ecx + 8]
mov eax, esi
jmp 0x44c874
mov edi, dword [ebp - 0x208]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x44c872
xor eax, eax
push 0x1fc
push eax
mov word [ebp - 0x204], ax
lea eax, [ebp - 0x202]
push eax
call fcn.004bf4f0
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.004bc45f
mov esp, ebp
pop ebp
ret
Function at 0x44fcb6
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov eax, dword [0x52de80]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x55b9c4], 0
push esi
je 0x44fcda
xor eax, eax
jmp 0x44fd67
mov al, byte [0x55b515]
xor esi, esi
movzx ecx, al
inc esi
test al, al
mov dword [fcn.004bc592], 0x4bc592
lea eax, [ebp - 0x198]
mov dword [fcn.004bbf10], 0x4bbf10
push eax
cmove ecx, esi
mov dword [fcn.004c073f], 0x4c073f
push 0x101
mov dword [fcn.004c5758], 0x4c5758
mov dword [fcn.004bc552], 0x4bc552
mov byte [0x55b515], cl
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x44fd64
mov eax, dword [ebp - 0x198]
cmp al, 1
jne 0x44fd5e
shr eax, 8
cmp al, 1
jne 0x44fd5e
mov dword [0x55b9c4], esi
mov dword [0x55b9c0], 3
jmp 0x44fcd3
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004bc45f
mov esp, ebp
pop ebp
ret
Function at 0x453357
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 0x453383
movsx ecx, byte [esi]
imul edx, edx, 0x21
xor edx, ecx
inc esi
inc ebx
cmp ebx, edi
jb 0x453375
pop edi
pop esi
mov eax, edx
pop ebx
ret

Function at 0x457319
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 0x457367
cmp dword [edi + 0x168], 0
je 0x457344
or esi, 0xffffffff
jmp 0x45735a
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 0x457384
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2733
jne 0x45736b
xor esi, esi
jmp 0x457384
mov edx, eax
mov ecx, edi
call fcn.004640c2
push eax
push str.Send_failure:__s
push dword [edi]
call fcn.004571d4
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 0x457478
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 0x45749a
push dword [esi + 0x14]
push dword [ebp + 0xc]
push dword [ebp + 8]
push edx
push esi
call eax
add esp, 0x14
jmp 0x4574c7
cmp edx, 2
ja 0x4574c5
push dword [esi + 0x10]
push 1
push 2
push dword [edx*4 + 0x50dab4]
call fcn.004c2ccc
push dword [esi + 0x10]
push 1
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004c2ccc
add esp, 0x20
xor eax, eax
pop esi
pop ebp
ret
Function at 0x45a9dd
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x52de80]
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.004623e0
push edx
push eax
call fcn.004623e0
push edx
push eax
call fcn.00462402
mov ecx, 0x3e8
cdq
idiv ecx
mov ecx, dword [esi + 0x9c]
add esp, 0x10
test ecx, ecx
jne 0x45aa2f
mov ecx, dword [esi + 0x98]
test ecx, ecx
je 0x45aa49
sub ecx, eax
test ecx, ecx
jg 0x45aa49
push str.Timed_out_before_server_could_connect_to_us
push esi
call fcn.004571d4
pop ecx
pop ecx
push 0x1c
jmp 0x45aaf4
push 0x3c
test ecx, ecx
pop eax
cmovne eax, ecx
or edx, 0xffffffff
imul eax, eax, 0x3e8
mov ecx, ebx
push eax
call fcn.00462542
pop ecx
cmp eax, 0xffffffff
je 0x45aae5
test eax, eax
je 0x45aade
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 0x45aa9a
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 0x45aaad
push str.Error_accept__ing_server_connect
jmp 0x45aaea
push str.Connection_accepted_from_server_n
push esi
call fcn.00457165
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 0x45aaf5
push str.Timeout_while_waiting_for_server_connect
jmp 0x45aaea
push str.Error_while_waiting_for_server_connect
push esi
call fcn.004571d4
pop ecx
pop ecx
push 0x1e
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc45f
mov esp, ebp
pop ebp
ret
Function at 0x45c105
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 0x45c139
push str.Couldnt_set_desired_mode
push ecx
call fcn.004571d4
pop ecx
pop ecx
push 0x11
pop eax
jmp 0x45c18d
cmp ebx, 0xc8
je 0x45c150
push ebx
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
push ecx
call fcn.00457165
add esp, 0xc
mov eax, dword [ebp + 8]
cmp eax, 0x10
jne 0x45c161
mov ecx, edi
call fcn.0045b6d0
jmp 0x45c189
cmp eax, 0x11
jne 0x45c16f
mov ecx, edi
call fcn.0045b710
jmp 0x45c189
cmp eax, 0x12
jne 0x45c178
push 0xa
jmp 0x45c17f
cmp eax, 0x13
jne 0x45c18b
push 0xb
mov dl, 1
mov ecx, edi
call fcn.0045b9c0
pop ecx
mov esi, eax
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x45e86a
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov eax, dword [0x52de80]
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 0x45e8a4
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.004571d4
add esp, 0xc
jmp 0x45e8cc
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x198]
cmp al, 2
jne 0x45e8bf
shr eax, 8
test al, al
jne 0x45e8bf
xor eax, eax
jmp 0x45e8cf
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.004571d4
pop ecx
pop ecx
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004bc45f
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x918
mov eax, dword [0x52de80]
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.0045ed31
mov eax, dword [esi + 0x1aac]
pop ecx
pop ecx
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x1aac], eax
cmp ecx, 0x18
je 0x45f2a3
cmp ecx, 0x23
je 0x45f281
cmp ecx, 0x27
jne 0x45f319
push 0
push ecx
push 0xfa
push 0xff
push str._c_c_c_c
lea eax, [ebp - 0x908]
push 0x800
push eax
call fcn.0045a7bb
mov esi, dword [esi + 0x18a8]
add esp, 0x1c
push 4
pop edi
jmp 0x45f250
push dword [esi]
call fcn.004c8000
inc eax
add eax, edi
mov dword [ebp - 0x914], eax
pop ecx
cmp eax, 0x7fa
jae 0x45f24d
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x108]
push eax
push str._127_____127s
push dword [esi]
call fcn.004c1b2c
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.0045a7bb
mov edi, dword [ebp - 0x914]
add esp, 0x2c
mov esi, dword [esi + 4]
test esi, esi
jne 0x45f1e5
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.0045a7bb
add esp, 0x14
add edi, 2
jmp 0x45f2e2
add esi, 0x1828
push esi
call fcn.004c8000
pop ecx
push 0xf0
lea edi, [eax + 6]
mov eax, 0xff
push eax
push esi
push 0
push 0x23
jmp 0x45f2c3
add esi, 0x1808
push esi
call fcn.004c8000
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.0045a7bb
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.0045ed31
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004bc45f
mov esp, ebp
pop ebp
ret
Function at 0x45fadd
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x52de80]
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.004c8000
pop ecx
mov ecx, 0xff
cmp eax, ecx
jae 0x45fc50
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.004bf4f0
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.00453195
pop ecx
pop ecx
cmp eax, 1
jne 0x45fb6a
lea edx, [ebp - 0x11c]
mov ecx, ebx
call fcn.00461999
mov ebx, dword [ebp - 0x11c]
test ebx, ebx
je 0x45fb85
push dword [edi + 0x74]
lea eax, [ebp - 0x108]
push eax
call fcn.004ebb60
pop ecx
pop ecx
cmp byte [ebp - 0x108], 0
jne 0x45fb9b
push dword [edi + 0x74]
push str.Couldnt_bind_to__s
jmp 0x45fc47
lea eax, [ebp - 0x108]
push eax
push str.We_bind_local_end_to__s_n
push edi
call fcn.00457165
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
call esi
cmp eax, 0xffffffff
je 0x45fc3b
test ebx, ebx
je 0x45fc3b
mov esi, dword [ebx]
mov edx, ebx
mov ecx, edi
call fcn.004532e5
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 0x45fc1a
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 0x45fc16
push str.getsockname___failed
push edi
call fcn.004571d4
pop ecx
pop ecx
jmp 0x45fc50
xor eax, eax
jmp 0x45fc53
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x128]
mov edx, eax
mov dword [edi + 0x8318], eax
call fcn.004640c2
push eax
push str.bind_failure:__s
jmp 0x45fc47
lea eax, [ebp - 0x108]
push eax
push str.couldnt_find_my_own_IP_address___s_
push edi
call fcn.004571d4
add esp, 0xc
push 0x2d
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc45f
mov esp, ebp
pop ebp
ret

Function at 0x45fd36
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 0x45fd80
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov ecx, edi
call fcn.004640c2
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.00457165
add esp, 0xc
jmp 0x45fd8d
push str.TCP_NODELAY_set_n
push esi
call fcn.00457165
pop ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x45fd93
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x52de80]
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 0x45ff64
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.0045305d
pop ecx
lea eax, [ebp - 0x88]
push eax
push str.__Trying__s...
push edi
call fcn.00457165
add esp, 0xc
cmp byte [edi + 0x1b6], bl
je 0x45fe27
mov ecx, dword [ebp - 0x90]
mov edx, esi
call fcn.0045fd36
mov ecx, dword [ebp - 0x90]
mov eax, dword [ecx]
cmp dword [eax + 0x74], ebx
je 0x45fe43
mov edx, esi
call fcn.0045fadd
test eax, eax
jne 0x45ff5d
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 0x45fe81
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 0x45ff11
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x8c], eax
cmp eax, 0xb
je 0x45ff05
cmp eax, 0x2732
jle 0x45fea9
cmp eax, 0x2734
jle 0x45ff05
mov ecx, dword [ebp - 0x90]
mov edx, eax
call fcn.004640c2
push eax
lea eax, [ebp - 0x88]
push eax
push str.Failed_to_connect_to__s:__s
push edi
call fcn.004571d4
mov eax, dword [ebp - 0x8c]
add esp, 0x10
mov dword [edi + 0x8318], eax
lea edx, [ebp - 0x8c]
mov ecx, esi
call fcn.0045fc64
test ebx, ebx
jne 0x45ff23
test al, al
je 0x45ff37
mov eax, dword [ebp - 0x94]
push str.connected_n
push edi
mov byte [eax], 1
call fcn.00457165
pop ecx
pop ecx
jmp 0x45ff1f
mov edx, dword [ebp + 8]
mov ecx, esi
call fcn.0045faba
mov ebx, eax
cmp ebx, 1
jne 0x45fed8
cmp dword [edi + 0x2d8], 2
jne 0x45fed8
mov eax, esi
jmp 0x45ff67
cmp ebx, 1
jne 0x45ff37
push str.Timeout_n
push edi
call fcn.00457165
pop ecx
pop ecx
jmp 0x45ff5d
mov edx, dword [ebp - 0x8c]
mov ecx, dword [ebp - 0x90]
mov dword [edi + 0x8318], edx
call fcn.004640c2
push eax
push 0x513958
push edi
call fcn.00457165
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.004bc45f
mov esp, ebp
pop ebp
ret
Function at 0x460273
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 0x46032d
sub edx, ecx
je 0x4602fe
dec edx
je 0x4602cf
dec edx
je 0x46033f
dec edx
je 0x46032d
push str.tftp_send_first:_internal_error_n
push ebx
call fcn.004571d4
pop ecx
pop ecx
jmp 0x460427
push str.Connected_for_transmit
push 0x513958
push ebx
call fcn.00457165
add esp, 0xc
mov dword [edi], 2
mov ecx, edi
call fcn.00460144
push 4
pop edx
mov ecx, edi
call fcn.004605a3
jmp 0x460427
push str.Connected_for_receive
push 0x513958
push ebx
call fcn.00457165
add esp, 0xc
mov dword [edi], 1
mov ecx, edi
call fcn.00460144
push 3
pop edx
mov ecx, edi
call fcn.0046042e
jmp 0x460427
inc dword [edi + 0x14]
mov eax, dword [edi + 0x14]
cmp eax, dword [edi + 0x1c]
jle 0x460346
mov dword [edi + 8], 9
mov dword [edi], ecx
jmp 0x460427
cmp byte [ebx + 0x199], 0
je 0x4603a6
push 2
call dword [sym.imp.WS2_32.dll_htons]
push dword [ebp - 4]
mov word [edi + 0x268], ax
call fcn.004c8000
pop ecx
mov ecx, dword [ebp - 4]
mov edx, eax
call fcn.00462486
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 0x4603b5
push edx
push ecx
mov ecx, ebx
call fcn.00460e67
add esp, 8
jmp 0x4603b5
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.0045a927
push esi
call fcn.004c8000
add esp, 0x1c
mov esi, eax
push dword [ebp - 8]
call fcn.004c8000
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 0x460427
call fcn.004c4c3f
push dword [eax]
call fcn.004ebaf7
pop ecx
push eax
push 0x513958
push ebx
call fcn.004571d4
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x46042e
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 0x4604c2
dec edx
dec edx
je 0x460477
dec edx
je 0x460454
push str.tftp_rx:_internal_error
jmp 0x4604af
inc dword [ebx + 0x14]
push dword [ebx + 0x14]
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push esi
call fcn.00457165
mov eax, dword [ebx + 0x14]
add esp, 0xc
cmp eax, dword [ebx + 0x1c]
jle 0x46047e
mov dword [ebx + 8], 8
mov dword [ebx], edi
jmp 0x460584
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 0x460584
call fcn.004c4c3f
push dword [eax]
call fcn.004ebaf7
pop ecx
push eax
push 0x513958
push esi
call fcn.004571d4
add esp, 0xc
jmp 0x460584
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 0x46050c
push edi
push str.Received_unexpected_DATA_packet_block__d_n
push esi
call fcn.00457165
add esp, 0xc
inc dword [ebx + 0x14]
mov eax, dword [ebx + 0x14]
cmp eax, dword [ebx + 0x1c]
jle 0x46050c
movzx eax, word [ebx + 0x30]
inc eax
push eax
push str.tftp_rx:_giving_up_waiting_for_block__d_n
push esi
call fcn.004571d4
add esp, 0xc
jmp 0x46059c
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 0x46056f
call fcn.004c4c3f
push dword [eax]
call fcn.004ebaf7
mov esi, dword [ebp - 4]
pop ecx
push eax
push 0x513958
push esi
call fcn.004571d4
add esp, 0xc
jmp 0x460572
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 0x4605a3
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 0x4605ff
dec edx
je 0x4605e5
dec edx
je 0x4605c2
push str.tftp_tx:_internal_error
jmp 0x4606d4
inc dword [edi + 0x14]
push dword [edi + 0x14]
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebx
call fcn.00457165
mov eax, dword [edi + 0x14]
add esp, 0xc
cmp eax, dword [edi + 0x1c]
jle 0x4605f0
mov dword [edi + 8], 8
mov dword [edi], 3
jmp 0x4606e2
push dword [edi + 0x58]
lea eax, [edi + 0x48]
push eax
mov eax, dword [edi + 0x60]
jmp 0x4606ac
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 0x460653
push ecx
push eax
push str.Received_ACK_for_block__d__expecting__d_n
push ebx
call fcn.00457165
add esp, 0x10
inc dword [edi + 0x14]
mov eax, dword [edi + 0x14]
cmp eax, dword [edi + 0x1c]
jle 0x4606fa
movzx eax, word [edi + 0x30]
push eax
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
push 0x513958
push ebx
call fcn.004571d4
add esp, 0x10
jmp 0x4606fa
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 0x460696
cmp dword [edi + 0x60], edx
jge 0x460696
mov dword [edi], 3
jmp 0x4606fa
mov ecx, dword [edi + 0xc]
lea esi, [edi + 0x60]
push esi
call fcn.00453672
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 0x4606e2
call fcn.004c4c3f
push dword [eax]
call fcn.004ebaf7
pop ecx
push eax
push 0x513958
push ebx
call fcn.004571d4
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