joyce8/EMBER2024-capa huggingface dataset:
Function at 0x415acf
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push 1
push 0x28
call dword [0x4452b4]
mov esi, eax
xor ebx, ebx
xor eax, eax
cmp esi, ebx
pop ecx
lea edi, [ebp - 8]
mov dword [ebp - 0xc], ebx
pop ecx
stosd dword es:[edi], eax
jne 0x415b04
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x415c2a
mov edi, dword [ebp + 8]
lea eax, [edi + 0x320]
push dword [eax]
mov dword [ebp - 4], eax
call fcn.0040d014
push dword [ebp + 0xc]
call dword [0x4452b0]
cmp eax, ebx
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
jne 0x415b35
push esi
call dword [0x4452a8]
pop ecx
jmp 0x415af5
mov eax, dword [ebp + 0x10]
push ebx
push 1
mov dword [edi + 0x324], eax
mov byte [edi + 0x32c], bl
mov dword [edi + 0x330], ebx
mov dword [edi + 0x328], ebx
mov dword [edi + 0x334], esi
or dword [esi + 0xc], 0xffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, ebx
mov dword [esi + 0x14], eax
jne 0x415b7b
push dword [ebp - 4]
call fcn.00415a16
pop ecx
push 0xb
jmp 0x415af7
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [esi + 0x18], eax
je 0x415b6b
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, ebx
mov dword [esi + 0x20], eax
je 0x415b6b
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [esi + 0x24], eax
je 0x415b6b
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [esi + 0x1c], eax
je 0x415b6b
call fcn.004257a6
add eax, 0x40
mov dword [esi + 0x10], eax
lea eax, [esi + 4]
push eax
push ebx
push edi
push 0x415880
push ebx
push ebx
call fcn.00431084
add esp, 0x18
cmp eax, ebx
mov dword [esi], eax
jne 0x415c02
call fcn.00422386
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 4]
call fcn.00415a16
pop ecx
jmp 0x415afd
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x1c]
push 0xffffffffffffffff
mov dword [ebp - 8], eax
push ebx
lea eax, [ebp - 0xc]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push ebx
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0xc], eax
mov al, 1
pop edi
pop esi
pop ebx
leave
ret
Function at 0x415c2f
Capabilities:
Terminate thread

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
mov eax, dword [ebp]
mov ebx, dword [eax + 0x9c]
test ebx, ebx
push esi
push edi
mov edi, dword [ebp + 0x334]
mov dword [esp + 0x18], eax
jne 0x415c60
mov eax, dword [eax + 0x98]
test eax, eax
mov ebx, eax
jne 0x415c60
mov ebx, 0x12c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
imul ebx, ebx, 0x3e8
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
push dword [edi + 0x18]
call esi
push dword [edi + 0x14]
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [edi + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push dword [edi + 0x18]
and dword [edi + 0x14], 0
call ebx
xor ebx, ebx
cmp dword [esp + 0x10], ebx
mov dword [edi + 0x18], ebx
jne 0x415cbd
push 0x1388
push dword [edi]
call esi
cmp eax, 0x102
jne 0x415d08
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
lea ebx, [edi + 8]
mov byte [ebp + 0x32c], 1
or dword [ebx], 0xffffffff
mov eax, dword [esp + 0x1c]
xor edi, edi
cmp eax, edi
je 0x415cdc
mov ecx, dword [ebp + 0x328]
mov dword [eax], ecx
cmp dword [ebp + 0x328], edi
jne 0x415d74
mov ebx, dword [ebx]
push 0x1b
pop edi
cmp ebx, edi
jne 0x415d22
mov esi, dword [esp + 0x18]
push str.out_of_memory
push str.Could_not_resolve_host:__s
call fcn.00409b0c
pop ecx
pop ecx
jmp 0x415d74
push dword [ebp + 0x330]
call dword [sym.imp.WS2_32.dll_WSASetLastError]
lea ebx, [edi + 8]
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
jmp 0x415cca
cmp ebx, 0xffffffff
je 0x415d5e
mov ebx, dword [ebp + 0x330]
cmp ebx, 0x2afc
je 0x415d5e
cmp byte [ebp + 0x32c], 0
je 0x415d71
mov eax, ebp
call fcn.004120f8
mov esi, dword [esp + 0x18]
push eax
push dword [ebp + 0x34]
push str.Could_not_resolve_host:__s___s
call fcn.00409b0c
add esp, 0xc
push 6
jmp 0x415d73
push dword [ebp + 0x34]
mov esi, dword [esp + 0x1c]
push str.Resolving_host_timed_out:__s
call fcn.00409b0c
pop ecx
pop ecx
push 0x1c
pop edi
lea eax, [ebp + 0x320]
push eax
call fcn.00415a16
cmp dword [ebp + 0x328], 0
pop ecx
jne 0x415d91
mov byte [ebp + 0xe4], 1
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x415dca
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push dword [ebp + 8]
mov esi, dword [edi]
mov ebx, eax
and dword [ebx], 0
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
push dword [ebp + 0xc]
push dword [ebp + 8]
je 0x415df5
push eax
call fcn.0041c774
add esp, 0xc
jmp 0x415e69
push edi
call fcn.00415acf
add esp, 0xc
test al, al
je 0x415e0c
mov dword [ebx], 1
xor eax, eax
jmp 0x415e69
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, edi
call fcn.004120f8
push eax
push dword [ebp + 8]
push str.init_resolve_thread___failed_for__s___s_n
call fcn.00409aa3
add esp, 0xc
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x415e5e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov eax, edi
call fcn.004120f8
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.gethostbyname_2__failed_for__s:_d___s_n
call fcn.00409aa3
add esp, 0x10
jmp 0x415e08
push dword [ebp + 0xc]
mov ebx, eax
call fcn.0041c7df
pop ecx
pop esi
pop ebx
pop ebp
ret

Function at 0x415f4d
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x444044]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebx]
push edi
mov edi, dword [ebx + 0xa4]
mov dword [ebp - 0x18], edi
call fcn.0041346f
push edx
push eax
call fcn.0041346f
push edx
push eax
call fcn.00413495
cdq
mov ecx, 0x3e8
idiv ecx
mov ecx, dword [esi + 0x9c]
add esp, 0x10
test ecx, ecx
jne 0x415f9c
mov ecx, dword [esi + 0x98]
test ecx, ecx
je 0x415fb8
sub ecx, eax
test ecx, ecx
jg 0x415fb4
push str.Timed_out_before_server_could_connect_to_us
call fcn.00409b0c
pop ecx
push 0x1c
jmp 0x41604d
mov eax, ecx
jmp 0x415fbb
push 0x3c
pop eax
imul eax, eax, 0x3e8
push edi
or edi, 0xffffffff
call fcn.0041331a
or edi, 0xffffffff
cmp eax, edi
pop ecx
je 0x416040
test eax, eax
je 0x416039
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0x1c], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x416005
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
push dword [ebp - 0x18]
call dword [sym.imp.WS2_32.dll_closesocket]
cmp edi, 0xffffffff
jne 0x41601a
push str.Error_accept__ing_server_connect
jmp 0x416045
push str.Connection_accepted_from_server_n
call fcn.00409aa3
pop ecx
xor eax, eax
push edi
inc eax
mov dword [ebx + 0xa4], edi
call fcn.0041177e
pop ecx
xor eax, eax
jmp 0x41604e
push str.Timeout_while_waiting_for_server_connect
jmp 0x416045
push str.Error_while_waiting_for_server_connect
call fcn.00409b0c
pop ecx
push 0x1e
pop eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0041e1a0
leave
ret
Function at 0x41748e
Capabilities:
Check http status code

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebx
push esi
push 0x64
cdq
pop ecx
idiv ecx
mov esi, dword [edi]
xor ebx, ebx
cmp eax, 2
je 0x4174b4
push str.Couldnt_set_desired_mode
call fcn.00409b0c
pop ecx
push 0x11
pop eax
jmp 0x41750f
cmp dword [esp + 0x10], 0xc8
je 0x4174ce
push dword [esp + 0x10]
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
call fcn.00409aa3
pop ecx
pop ecx
mov eax, dword [esp + 0x14]
cmp eax, 0x10
jne 0x4174e0
mov eax, edi
call fcn.00416b7e
jmp 0x41750b
cmp eax, 0x11
jne 0x4174ee
mov esi, edi
call fcn.00416bb8
jmp 0x41750b
cmp eax, 0x12
jne 0x4174f9
push 1
push 0xa
jmp 0x417502
cmp eax, 0x13
jne 0x41750d
push 1
push 0xb
pop ebx
mov eax, edi
call fcn.00416e41
pop ecx
mov ebx, eax
mov eax, ebx
pop esi
pop ebx
pop ecx
ret
Function at 0x41941b
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, eax
mov ebx, dword [edi + 0x16c]
push 0x5c
push dword [ebx]
call fcn.0042fe30
mov esi, dword [edi]
and dword [ebp - 0x10], 0
and dword [ebp - 0xc], 0
pop ecx
pop ecx
mov dword [ebp - 8], eax
call fcn.0041346f
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x80]
mov dword [edi + 0x200], eax
mov eax, dword [esi + 0x28]
mov dword [edi + 0x204], eax
lea eax, [esi + 0x2f4]
mov dword [edi + 0x1fc], eax
mov eax, dword [ebp - 8]
test eax, eax
mov dword [ebp - 0x14], edx
jne 0x41947f
push 0x25
pop eax
jmp 0x41955d
cmp byte [eax + 1], 0
je 0x419477
push 0x43f498
push dword [ebx]
call fcn.0043059a
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 8], eax
jne 0x4194ac
push dword [ebx]
push str.Cant_open__s_for_writing
call fcn.00409b0c
pop ecx
pop ecx
push 0x17
jmp 0x419479
mov eax, dword [esi + 0xa8]
cmp eax, 0xffffffff
mov ecx, dword [esi + 0xac]
jne 0x4194c1
cmp ecx, eax
je 0x4194cc
push ecx
push eax
mov eax, esi
call fcn.004128f3
pop ecx
pop ecx
push 0x4000
lea ecx, [ebp - 4]
call fcn.00409e91
mov ebx, eax
test ebx, ebx
pop ecx
jne 0x419552
cmp dword [ebp - 4], eax
jbe 0x419540
push dword [ebp - 8]
lea eax, [esi + 0x2f4]
push dword [ebp - 4]
push 1
push eax
call fcn.0041fe19
mov ecx, dword [ebp - 4]
add esp, 0x10
cmp eax, ecx
jne 0x41953d
add dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x200], eax
adc dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
mov ecx, edi
mov dword [esi + 0x204], eax
call fcn.00412921
test eax, eax
jne 0x41954f
push dword [ebp - 0x14]
mov eax, esi
push dword [ebp - 0x18]
call fcn.0041254c
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
je 0x4194cc
jmp 0x419552
push 0x37
pop ebx
test ebx, ebx
jne 0x419552
mov ecx, edi
call fcn.00412921
test eax, eax
je 0x419552
push 0x2a
pop ebx
push dword [ebp - 8]
call fcn.0041fc3e
pop ecx
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x419f98
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
mov eax, dword [0x444044]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0x198]
push eax
push 2
mov esi, ecx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x419fcf
push eax
push str.WSAStartup_failed___d_
call fcn.00409b0c
pop ecx
jmp 0x419ff5
call dword [sym.imp.WS2_32.dll_WSACleanup]
cmp byte [ebp - 0x198], 2
jne 0x419feb
cmp byte [ebp - 0x197], 0
jne 0x419feb
xor eax, eax
jmp 0x419ff9
push str.insufficient_winsock_version_to_support_telnet
call fcn.00409b0c
pop ecx
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0041e1a0
leave
ret
Function at 0x41a7be
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
lea ebp, [esp - 0x890]
sub esp, 0x910
mov eax, dword [0x444044]
xor eax, ebp
mov dword [ebp + 0x88c], eax
push ebx
mov ebx, ecx
mov ecx, dword [ebx]
push esi
mov esi, dword [ebx + 0x16c]
mov eax, dword [esi + 0x1ab0]
sub eax, dword [esi + 0x1aac]
push edi
inc eax
inc eax
push eax
lea eax, [esi + 0x18ac]
push 0x3c
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x7c], ecx
call fcn.0041a3da
mov eax, dword [esi + 0x1aac]
pop ecx
pop ecx
movzx ecx, byte [eax]
inc eax
cmp ecx, 0x18
mov dword [esi + 0x1aac], eax
je 0x41a927
cmp ecx, 0x23
je 0x41a906
cmp ecx, 0x27
jne 0x41a98d
push 0
push ecx
push 0xfa
mov edi, 0xff
push edi
push str._c_c_c_c
lea eax, [ebp - 0x74]
push 0x800
push eax
call fcn.004115d9
mov esi, dword [esi + 0x18a8]
add esp, 0x1c
push 4
pop ebx
jmp 0x41a8c5
push dword [esi]
call fcn.0041f820
inc eax
add eax, ebx
cmp eax, 0x7fa
pop ecx
mov dword [ebp - 0x80], eax
jae 0x41a8c2
lea eax, [ebp + 0x80c]
push eax
lea eax, [ebp + 0x78c]
push eax
push str._127_____127s
push dword [esi]
call fcn.0042ffa5
lea eax, [ebp + 0x80c]
push eax
push 1
lea eax, [ebp + 0x78c]
push eax
push 0
mov eax, 0x800
sub eax, ebx
push str._c_s_c_s
push eax
lea eax, [ebp + ebx - 0x74]
push eax
call fcn.004115d9
mov ebx, dword [ebp - 0x80]
add esp, 0x2c
mov esi, dword [esi + 4]
test esi, esi
jne 0x41a864
push pe_nt_image_headers32
push edi
mov eax, 0x800
sub eax, ebx
push 0x43faa0
push eax
lea eax, [ebp + ebx - 0x74]
push eax
call fcn.004115d9
add esp, 0x14
push esi
inc ebx
inc ebx
push ebx
lea eax, [ebp - 0x74]
push eax
mov eax, dword [ebp - 0x78]
push dword [eax + 0xa0]
call dword [sym.imp.WS2_32.dll_send]
add ebx, 0xfffffffe
push ebx
jmp 0x41a97e
add esi, 0x1828
push esi
mov dword [ebp - 0x78], esi
call fcn.0041f820
push pe_nt_image_headers32
mov edi, 0xff
push edi
push esi
push 0
push 0x23
jmp 0x41a946
add esi, 0x1808
push esi
mov dword [ebp - 0x78], esi
call fcn.0041f820
push pe_nt_image_headers32
mov edi, 0xff
push edi
push esi
push 0
push 0x18
push 0xfa
push edi
mov esi, eax
push str._c_c_c_c_s_c_c
lea eax, [ebp - 0x74]
push 0x800
push eax
add esi, 6
call fcn.004115d9
add esp, 0x2c
push 0
push esi
lea eax, [ebp - 0x74]
push eax
push dword [ebx + 0xa0]
call dword [sym.imp.WS2_32.dll_send]
add esi, 0xfffffffe
push esi
mov ecx, dword [ebp - 0x7c]
push 0x3e
lea eax, [ebp - 0x72]
call fcn.0041a3da
pop ecx
pop ecx
mov ecx, dword [ebp + 0x88c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041e1a0
add ebp, 0x890
leave
ret
Function at 0x41b4b4
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov edi, eax
mov eax, dword [edi + 0xc]
mov esi, dword [eax]
cmp byte [esi + 0x18c], 0
mov ebx, dword [eax + 0x50]
mov dword [ebp - 4], str.octet
je 0x41b4dd
mov dword [ebp - 4], str.netascii
mov eax, dword [ebp + 8]
sub eax, 0
push 3
pop ecx
je 0x41b552
sub eax, ecx
je 0x41b52f
dec eax
je 0x41b504
dec eax
je 0x41b564
dec eax
je 0x41b552
push str.tftp_send_first:_internal_error_n
call fcn.00409b0c
jmp 0x41b640
push str.Connected_for_transmit
push 0x43d138
call fcn.00409aa3
mov dword [edi], 2
call fcn.0041b390
push 4
mov ebx, edi
call fcn.0041b7c6
add esp, 0xc
jmp 0x41b641
push str.Connected_for_receive
push 0x43d138
call fcn.00409aa3
mov dword [edi], 1
call fcn.0041b390
push 3
call fcn.0041b646
jmp 0x41b527
inc dword [edi + 0x14]
mov eax, dword [edi + 0x14]
cmp eax, dword [edi + 0x1c]
jle 0x41b56b
mov dword [edi + 8], 9
mov dword [edi], ecx
jmp 0x41b641
cmp byte [esi + 0x199], 0
je 0x41b5c4
push 2
call dword [sym.imp.WS2_32.dll_htons]
push ebx
mov word [edi + 0x268], ax
call fcn.0041f820
pop ecx
mov ecx, ebx
call fcn.0041bcf5
mov ecx, dword [edi + 0xc]
mov ebx, eax
lea eax, [edi + 0x26c]
mov dword [ecx + 0x1fc], eax
mov eax, dword [esi + 0xa8]
mov ecx, dword [esi + 0xac]
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
je 0x41b5d3
push ecx
push eax
mov eax, esi
call fcn.004128f3
pop ecx
pop ecx
jmp 0x41b5d3
push 1
call dword [sym.imp.WS2_32.dll_htons]
mov word [edi + 0x268], ax
push 0
push dword [ebp - 4]
lea eax, [edi + 0x26a]
push 0
push ebx
push str._s_c_s_c
push eax
call fcn.00411740
push ebx
call fcn.0041f820
add esp, 0x1c
push dword [ebp - 4]
mov ebx, eax
call fcn.0041f820
pop ecx
lea ecx, [ebx + eax + 4]
mov eax, dword [edi + 0xc]
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
jge 0x41b641
call fcn.00422386
push dword [eax]
call fcn.00430a03
pop ecx
push eax
push 0x43d138
call fcn.00409b0c
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41b646
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [edi + 0xc]
push ebx
push esi
mov esi, dword [eax]
mov eax, dword [ebp + 8]
push 3
pop ebx
sub eax, ebx
mov dword [ebp - 4], esi
je 0x41b6e9
dec eax
dec eax
je 0x41b6a0
dec eax
je 0x41b67f
push str.tftp_rx:_internal_error
push 0x43d138
call fcn.00409b0c
pop ecx
pop ecx
jmp 0x41b7a3
inc dword [edi + 0x14]
push dword [edi + 0x14]
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
call fcn.00409aa3
mov eax, dword [edi + 0x14]
cmp eax, dword [edi + 0x1c]
pop ecx
pop ecx
jle 0x41b6a7
mov dword [edi + 8], 8
mov dword [edi], ebx
jmp 0x41b7a3
push dword [edi + 0x58]
lea eax, [edi + 0x48]
push eax
push 0
push 4
lea eax, [edi + 0x268]
push eax
push dword [edi + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x41b7a3
call fcn.00422386
push dword [eax]
call fcn.00430a03
push eax
push 0x43d138
call fcn.00409b0c
add esp, 0xc
jmp 0x41b7a3
movzx eax, word [edi + 0x66]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ebx, ax
movzx eax, word [edi + 0x30]
inc eax
cmp eax, ebx
je 0x41b72f
push ebx
push str.Received_unexpected_DATA_packet_block__d_n
call fcn.00409aa3
inc dword [edi + 0x14]
mov eax, dword [edi + 0x14]
cmp eax, dword [edi + 0x1c]
pop ecx
pop ecx
jle 0x41b72f
movzx eax, word [edi + 0x30]
inc eax
push eax
push str.tftp_rx:_giving_up_waiting_for_block__d_n
call fcn.00409b0c
pop ecx
pop ecx
jmp 0x41b7c2
mov esi, dword [sym.imp.WS2_32.dll_htons]
and dword [edi + 0x14], 0
mov word [edi + 0x30], bx
push 4
lea ebx, [edi + 0x268]
call esi
mov word [ebx], ax
movzx eax, word [edi + 0x30]
push eax
call esi
push dword [edi + 0x58]
mov word [edi + 0x26a], ax
lea eax, [edi + 0x48]
push eax
push 0
push 4
push ebx
push dword [edi + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x41b78e
call fcn.00422386
push dword [eax]
call fcn.00430a03
mov esi, dword [ebp - 4]
push eax
push 0x43d138
call fcn.00409b0c
add esp, 0xc
mov esi, dword [ebp - 4]
xor eax, eax
cmp dword [edi + 0x5c], 0x204
setl al
lea eax, [eax + eax + 1]
mov dword [edi], eax
movzx eax, word [edi + 0x30]
push 0
cdq
push 0x200
push edx
push eax
call fcn.0042bd30
mov dword [esi + 0x1f8], eax
mov dword [esi + 0x1fc], edx
pop esi
pop ebx
leave
ret
Function at 0x41b7c6
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [ebx + 0xc]
push ebp
push esi
mov esi, dword [eax]
mov eax, dword [esp + 0xc]
sub eax, 4
push edi
je 0x41b82e
dec eax
je 0x41b814
dec eax
je 0x41b7f3
push str.tftp_tx:_internal_error
push 0x43d138
call fcn.00409b0c
pop ecx
pop ecx
jmp 0x41b910
inc dword [ebx + 0x14]
push dword [ebx + 0x14]
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
call fcn.00409aa3
mov eax, dword [ebx + 0x14]
cmp eax, dword [ebx + 0x1c]
pop ecx
pop ecx
jle 0x41b81f
mov dword [ebx + 8], 8
mov dword [ebx], 3
jmp 0x41b910
push dword [ebx + 0x58]
lea eax, [ebx + 0x48]
push eax
mov eax, dword [ebx + 0x60]
jmp 0x41b8dc
movzx eax, word [ebx + 0x66]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
movzx eax, word [ebx + 0x30]
movzx edx, ax
cmp ecx, edx
je 0x41b881
push edx
push ecx
push str.Received_ACK_for_block__d__expecting__d_n
call fcn.00409aa3
add esp, 0xc
inc dword [ebx + 0x14]
mov eax, dword [ebx + 0x14]
cmp eax, dword [ebx + 0x1c]
jle 0x41b92f
movzx eax, word [ebx + 0x30]
push eax
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
push 0x43d138
call fcn.00409b0c
add esp, 0xc
jmp 0x41b92f
mov edi, dword [sym.imp.WS2_32.dll_htons]
and dword [ebx + 0x14], 0
push 3
pop ebp
inc eax
push ebp
mov word [ebx + 0x30], ax
call edi
mov word [ebx + 0x268], ax
movzx eax, word [ebx + 0x30]
push eax
call edi
cmp word [ebx + 0x30], 1
mov word [ebx + 0x26a], ax
jbe 0x41b8bf
cmp dword [ebx + 0x60], 0x200
jge 0x41b8bf
mov dword [ebx], ebp
jmp 0x41b92f
mov edi, dword [ebx + 0xc]
lea ebp, [ebx + 0x60]
push 0x200
mov ecx, ebp
call fcn.00409e91
pop ecx
push dword [ebx + 0x58]
lea eax, [ebx + 0x48]
push eax
mov eax, dword [ebp]
push 0
add eax, 4
push eax
lea eax, [ebx + 0x268]
push eax
push dword [ebx + 0x10]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x41b910
call fcn.00422386
push dword [eax]
call fcn.00430a03
push eax
push 0x43d138
call fcn.00409b0c
add esp, 0xc
movzx eax, word [ebx + 0x30]
push 0
cdq
push 0x200
push edx
push eax
call fcn.0042bd30
mov dword [esi + 0x200], eax
mov dword [esi + 0x204], edx
pop edi
pop esi
pop ebp
ret
Function at 0x41cfeb
Capabilities:
Read file on windows

Disassembly:
cmp dword [esi + 8], 0
jne 0x41d00d
mov eax, dword [esi]
push 0x440274
push dword [eax + 8]
call fcn.0043059a
test eax, eax
pop ecx
pop ecx
mov dword [esi + 8], eax
jne 0x41d00d
or eax, 0xffffffff
ret
push edi
push dword [esi + 8]
push dword [esp + 0x10]
push 1
push dword [esp + 0x14]
call fcn.0042067d
mov edi, eax
add esp, 0x10
cmp edi, dword [esp + 0xc]
je 0x41d03e
push dword [esi + 8]
call fcn.0041fc3e
mov eax, dword [esi]
and dword [esi + 8], 0
mov eax, dword [eax]
pop ecx
mov dword [esi], eax
mov eax, edi
pop edi
ret

Function at 0x41ddae
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x444044]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0041dced
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.0041e790
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x41ddfd
cmp dword [ebp - 0x1c], 5
jb 0x41de15
jmp 0x41de11
cmp dword [ebp - 0x10], 1
jne 0x41de15
cmp dword [ebp - 0x1c], 4
ja 0x41de11
jne 0x41de15
cmp dword [ebp - 0x18], 0
jbe 0x41de15
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x43939c
call fcn.00403a67
test eax, eax
jge 0x41de36
mov byte [0x446378], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0041e1a0
add ebp, 0x78
leave
ret

Function at 0x41e1a0
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x444044]
jne 0x41e1aa
repz ret
jmp fcn.00420fb9

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

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x41fa35
call fcn.00422399
mov dword [eax], esi
call fcn.00422386
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.00420171
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x41fa11
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x41fa64
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004223ac
pop ecx
call fcn.00422386
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x41fa8b
test al, 1
je 0x41fa8b
test byte [esp + 0xc], 2
je 0x41fa8b
call fcn.00422399
mov dword [eax], 5
call fcn.00422386
mov dword [eax], 0xd
jmp 0x41fa5b
xor eax, eax
pop esi
ret