joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1011bbb0
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x1011bc3c
push esi
call fcn.10129bc0
add esp, 4
test al, al
jne 0x1011bc3c
push ebx
push edi
mov edi, esi
xor ebx, ebx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x1011bbd3
sub edi, ecx
push edi
push 0x2e
push esi
call fcn.1012a620
add esp, 0xc
test eax, eax
je 0x1011bc07
sub eax, esi
push eax
push 0x2e
push esi
call fcn.1012a620
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x1011bc09
inc ebx
mov ecx, esi
sub ecx, ebx
add edi, ecx
test ebx, ebx
cmovne esi, ebx
mov ebx, 0x1505
add edi, esi
cmp esi, edi
jae 0x1011bc35
mov al, byte [esi]
push eax
call fcn.10119d20
movsx ecx, al
inc esi
mov eax, ebx
add esp, 4
shl eax, 5
add eax, ebx
xor ecx, eax
mov ebx, ecx
cmp esi, edi
jb 0x1011bc17
pop edi
movzx eax, bl
pop ebx
pop esi
ret
xor eax, eax
pop esi
ret
Function at 0x101212f0
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x10c
mov eax, dword [0x101fd700]
xor eax, esp
mov dword [esp + 0x108], eax
mov edx, dword [esp + 0x114]
mov eax, dword [esp + 0x118]
push ebx
mov ebx, dword [esp + 0x124]
push ebp
mov ebp, dword [esp + 0x118]
mov dword [esp + 0xc], eax
push esi
push edi
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + edx*4 + 0x150]
lea esi, [ecx + 0x178]
mov dword [esp + 0x10], eax
mov eax, edx
shl eax, 4
add esi, eax
mov eax, dword [ecx + 0x2a8]
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [eax + 0x44], 3
je 0x101213da
cmp dword [ecx + edx*4 + 0x168], 0x101211a0
jne 0x101213da
cmp dword [esi], 0
je 0x1012136f
test edi, edi
je 0x101213da
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [esp + 0x20]
call fcn.10142530
add esp, 0x14
cmp eax, 0xffffffff
je 0x101213da
test al, 1
je 0x101213da
mov ecx, dword [esi]
test ecx, ecx
jne 0x101213c0
mov eax, dword [ebp + 0x4c8]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [0x101fd2e4]
mov ecx, eax
add esp, 4
mov dword [esi], ecx
test ecx, ecx
je 0x10121418
mov edi, dword [esi + 4]
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov eax, dword [esi + 8]
push 0
push edi
add eax, ecx
push eax
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x101213da
add dword [esi + 8], eax
push 0
push dword [esp + 0x130]
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_send]
mov esi, eax
mov dword [ebx], 0
cmp esi, 0xffffffff
jne 0x1012144e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp edi, 0x2733
jne 0x10121423
xor esi, esi
mov dword [ebx], 0x51
jmp 0x1012144e
mov dword [ebx], 0x1b
or eax, 0xffffffff
jmp 0x10121450
push 0x100
lea eax, [esp + 0x1c]
push eax
push edi
call fcn.10129010
push eax
push str.Send_failure:__s
push ebp
call fcn.10120f40
mov dword [ebp + 0x948], edi
add esp, 0x18
mov dword [ebx], 0x37
mov eax, esi
mov ecx, dword [esp + 0x118]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10176fcb
add esp, 0x10c
ret

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

Disassembly:
mov eax, dword [esp + 4]
cmp byte [eax + 0x1a4], 0
je 0x1012196d
push eax
call fcn.10117b10
add esp, 4
test eax, eax
je 0x1012198e
mov al, 1
ret
mov eax, dword [eax + 0x150]
cmp eax, 0xffffffff
je 0x1012198e
push 2
push 1
lea ecx, [esp + 0xc]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
setne al
ret
xor al, al
ret
Function at 0x10122250
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
mov eax, dword [0x10203684]
mov dword [esp + 4], 0x4020
mov dword [esp], 0
mov dword [esp + 8], 4
test eax, eax
jne 0x101222a1
push 3
push 2
push eax
push eax
push 6
call fcn.101463b0
add esp, 0x14
test al, al
je 0x10122295
mov dword [0x10203684], 2
add esp, 0xc
ret
mov dword [0x10203684], 1
jmp 0x101222a6
cmp eax, 2
je 0x101222ec
lea eax, [esp + 8]
push eax
lea eax, [esp + 4]
push eax
push 0x1001
push 0xffff
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x101222d1
mov eax, dword [esp]
cmp eax, dword [esp + 4]
jg 0x101222ec
push 4
lea eax, [esp + 8]
push eax
push 0x1001
push 0xffff
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_setsockopt]
add esp, 0xc
ret
Function at 0x101236b0
Capabilities:
Get common file path

Disassembly:
push ecx
push ebx
push edi
push 0x101b2514
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
test ebx, ebx
jne 0x101236ca
pop edi
pop ebx
pop ecx
ret
push ebp
push esi
push str.LoadLibraryExA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [esp + 0x18]
mov ebp, eax
push 0x101b2530
push esi
call fcn.1018cdc0
add esp, 8
test eax, eax
je 0x10123712
test ebp, ebp
je 0x10123703
push 8
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
test ebp, ebp
je 0x10123738
push str.AddDllDirectory
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x10123738
push 0x800
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x101237ef
mov ecx, esi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10123755
sub ecx, ebx
lea eax, [ecx + 1]
add eax, edx
push eax
call dword [0x101fd2e4]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x101237e5
push dword [esp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x101237e5
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10123787
sub ecx, edx
mov eax, 0x5c
mov word [ecx + ebx], ax
mov ecx, ebx
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101237a0
sub ecx, edx
sub ecx, esi
add ecx, ebx
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x101237b0
test ebp, ebp
je 0x101237dc
push 8
push 0
push ebx
call ebp
push ebx
mov edi, eax
call dword [0x101fd2e8]
add esp, 4
mov eax, edi
pop esi
pop ebp
pop edi
pop ebx
pop ecx
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
push ebx
call dword [0x101fd2e8]
add esp, 4
pop esi
pop ebp
mov eax, edi
pop edi
pop ebx
pop ecx
ret
Function at 0x101273e0
Capabilities:
Query environment variable

Disassembly:
push ebx
push ebp
xor ebp, ebp
push esi
push edi
lea esi, [ebp + 1]
push esi
push ebp
call dword [0x101fd2ec]
mov edi, eax
add esp, 8
test edi, edi
je 0x10127437
nop word [eax + eax]
push esi
push edi
push dword [esp + 0x1c]
mov ebp, edi
mov ebx, esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
test esi, esi
je 0x1012744f
cmp esi, ebx
je 0x1012744f
cmp esi, 0x8000
ja 0x1012744f
cmp esi, ebx
jb 0x10127448
push esi
push edi
call dword [0x101fd2ec]
mov edi, eax
add esp, 8
test edi, edi
jne 0x10127400
push ebp
call dword [0x101fd2e8]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
call dword [0x101fd2e8]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x10129bc0
Capabilities:
Convert ip address from string

Disassembly:
sub esp, 0x18
mov eax, dword [0x101fd700]
xor eax, esp
mov dword [esp + 0x14], eax
push esi
mov esi, dword [esp + 0x20]
lea eax, [esp + 4]
push eax
push esi
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jg 0x10129c08
lea eax, [esp + 8]
push eax
push esi
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
pop esi
setg al
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.10176fcb
add esp, 0x18
ret
mov ecx, dword [esp + 0x18]
mov al, 1
pop esi
xor ecx, esp
call fcn.10176fcb
add esp, 0x18
ret

Function at 0x10129d00
Capabilities:
Create udp socket

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x10129d12
mov eax, dword [eax + 0x70]
mov al, byte [eax + 0xe3]
ret
push 0
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x10129d26
xor al, al
ret
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, 1
ret
Function at 0x1012ad10
Capabilities:
Move file

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
lea eax, [esp + 0xc]
push edi
push eax
call fcn.10140bb0
push dword [esp + 0x38]
movups xmm0, xmmword [eax]
movups xmmword [esp + 0x18], xmm0
call fcn.10193aea
push dword [esp + 0x40]
mov edi, eax
call fcn.10193aea
mov ebx, dword [sym.imp.KERNEL32.dll_MoveFileExA]
add esp, 0xc
mov esi, eax
push 1
push esi
push edi
call ebx
test eax, eax
jne 0x1012ada5
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
nop dword [eax + eax]
lea eax, [esp + 0x20]
push eax
call fcn.10140bb0
movups xmm0, xmmword [esp + 0x14]
sub esp, 0xc
mov ecx, esp
sub esp, 0x10
movups xmmword [ecx], xmm0
mov ecx, esp
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
call fcn.10140c60
add esp, 0x20
test edx, edx
ja 0x1012adc9
jb 0x1012ad97
cmp eax, 0x3e8
ja 0x1012adc9
push 1
call ebp
push 1
push esi
push edi
call ebx
test eax, eax
je 0x1012ad60
test edi, edi
je 0x1012adb2
push edi
call fcn.1017c4bc
add esp, 4
test esi, esi
je 0x1012adbf
push esi
call fcn.1017c4bc
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
test edi, edi
je 0x1012add6
push edi
call fcn.1017c4bc
add esp, 4
test esi, esi
je 0x1012ade3
push esi
call fcn.1017c4bc
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret

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

Disassembly:
sub esp, 0x88
mov eax, dword [0x101fd700]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x9c]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
or esi, 0xffffffff
push eax
mov ebx, dword [edi + 0xc]
mov ebp, dword [ebx + 0x154]
push ebp
mov dword [esp + 0x1c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x101301b3
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x80
push eax
lea eax, [esp + 0x18]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
push ebp
push ebx
push edi
call fcn.10121880
add esp, 0xc
cmp esi, 0xffffffff
jne 0x101301d8
push str.Error_accept__ing_server_connect
push edi
call fcn.10120f40
add esp, 8
mov eax, 0x1e
jmp 0x10130248
push str.Connection_accepted_from_server
push edi
call fcn.10121010
push 1
push esi
mov byte [ebx + 0x26d], 0
mov dword [ebx + 0x154], esi
call fcn.10146010
add esp, 0x10
mov byte [ebx + 0x280], 1
cmp dword [edi + 0x1b0], 0
je 0x10130246
push 1
push edi
call fcn.1011ecc0
mov eax, dword [edi + 0x1b0]
push 1
push esi
push dword [edi + 0x1b4]
call eax
push 0
push edi
mov esi, eax
call fcn.1011ecc0
add esp, 0x1c
test esi, esi
je 0x10130246
push ebx
push edi
call fcn.101306e0
add esp, 8
mov eax, 0x2a
jmp 0x10130248
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10176fcb
add esp, 0x88
ret
Function at 0x10132180
Capabilities:
Check http status code

Disassembly:
mov ecx, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
lea eax, [ecx - 0xc8]
xor edi, edi
mov ebx, dword [esi + 0xc]
cmp eax, 0x64
jb 0x101321b0
push str.Couldnt_set_desired_mode
push esi
call fcn.10120f40
add esp, 8
lea eax, [edi + 0x11]
pop edi
pop esi
pop ebx
ret
cmp ecx, 0xc8
je 0x101321c7
push ecx
push str.Got_a__03d_response_code_instead_of_the_assumed_200
push esi
call fcn.10121010
add esp, 0xc
mov eax, dword [esp + 0x18]
push ebp
cmp eax, 0x13
jne 0x101321e2
push ebx
push esi
call fcn.10132080
add esp, 8
mov edi, eax
pop ebp
pop edi
pop esi
pop ebx
ret
cmp eax, 0x14
jne 0x101322f2
mov edi, dword [esi + 0xc]
xor ebx, ebx
cmp dword [esi + 0x4e8], 2
mov dword [esp + 0x18], edi
jne 0x10132260
mov eax, dword [esi + 0x134]
mov eax, dword [eax]
test eax, eax
je 0x10132260
push 3
push ebx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
push ecx
push ebx
push eax
call fcn.10114c70
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x1013231f
push 0x2f
push dword [esp + 0x18]
call fcn.101795e0
add esp, 8
test eax, eax
je 0x1013224f
mov ebx, dword [esp + 0x14]
mov ecx, 1
sub eax, ebx
cmovne ecx, eax
mov byte [ecx + ebx], 0
jmp 0x1013225c
push dword [esp + 0x14]
call dword [0x101fd2e8]
add esp, 4
mov edi, dword [esp + 0x18]
mov ecx, dword [esi + 0x530]
test ecx, ecx
jne 0x1013227e
cmp byte [esi + 0xd0c], 0
mov ecx, str.NLST
mov eax, str.LIST
cmove ecx, eax
mov edx, 0x101dca4e
test ebx, ebx
mov eax, edx
cmovne eax, ebx
push eax
mov eax, 0x101e3110
cmove eax, edx
push eax
push ecx
push 0x101b1c48
call fcn.101188b0
push ebx
mov ebp, eax
call dword [0x101fd2e8]
add esp, 0x14
test ebp, ebp
jne 0x101322bb
mov edi, 0x1b
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
ret
push ebp
push 0x101defbc
lea eax, [edi + 0x440]
push eax
push esi
call fcn.1014cef0
push ebp
mov edi, eax
call dword [0x101fd2e8]
add esp, 0x14
test edi, edi
jne 0x1013231f
mov eax, dword [esi + 0xc]
pop ebp
mov dword [eax + 0x4c4], 0x1f
mov eax, edi
pop edi
pop esi
pop ebx
ret
cmp eax, 0x15
jne 0x1013230b
push 0xd
push 1
push esi
call fcn.10131c10
add esp, 0xc
mov edi, eax
pop ebp
pop edi
pop esi
pop ebx
ret
cmp eax, 0x16
jne 0x1013231f
push 0xe
push 1
push esi
call fcn.10131c10
add esp, 0xc
mov edi, eax
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
ret
Function at 0x1013be20
Capabilities:
Send data
Send data on socket

Disassembly:
mov ecx, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push 0
mov byte [esp + 0x12], cl
lea ecx, [esp + 0x10]
push 3
mov eax, dword [esi + 0xc]
push ecx
mov byte [esp + 0x18], 0xff
mov byte [esp + 0x19], bl
push dword [eax + 0x150]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1013be6c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.10120f40
add esp, 0xc
push dword [esp + 0x14]
push ebx
push str.SENT
push esi
call fcn.1013ba40
add esp, 0x10
pop esi
pop ebx
ret

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

Disassembly:
sub esp, 0xc
cmp dword [esp + 0x14], 0x1f
push ebx
mov ebx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x134]
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x14], ecx
mov dword [esp + 4], eax
jne 0x1013c12c
push ebp
push esi
lea ebp, [ecx + 0x1cb4]
push edi
lea edi, [ecx + 0x1eb4]
mov eax, ebp
mov dword [edi], ebp
cmp ebp, edi
jae 0x1013c004
lea eax, [ebp + 1]
mov byte [ebp], 0xff
mov dword [edi], eax
cmp eax, edi
jae 0x1013c018
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1013c018
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ecx + 0x1ca8]
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x24], eax
shr eax, 8
mov dword [esp + 0x14], eax
movzx ecx, word [ecx + 0x1caa]
push ecx
call esi
mov ecx, dword [edi]
mov edx, eax
shr edx, 8
mov dword [esp + 0x18], eax
cmp ecx, edi
jae 0x1013c095
mov eax, dword [esp + 0x24]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x1013c095
mov eax, dword [esp + 0x14]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x1013c095
mov eax, dword [esp + 0x18]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x1013c095
mov byte [ecx], dl
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x1013c095
mov byte [ecx], 0xff
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x1013c095
mov byte [ecx], 0xf0
mov ecx, dword [edi]
inc ecx
mov esi, dword [esp + 0x20]
mov dword [edi], ebp
mov dword [esi + 0x1eb8], ecx
lea eax, [esi + 0x1cb6]
sub ecx, ebp
sub ecx, 2
push ecx
push eax
push 0x3e
push ebx
call fcn.1013bb40
mov eax, dword [esp + 0x20]
add esp, 0x10
push 0
push 3
push ebp
push dword [eax + 0x150]
mov ebp, dword [sym.imp.WS2_32.dll_send]
call ebp
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jns 0x1013c0eb
call edi
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.10120f40
add esp, 0xc
push 4
lea eax, [esi + 0x1cb7]
push eax
push ebx
call fcn.1013be90
add esp, 0xc
lea eax, [esi + 0x1cbb]
push 0
push 2
push eax
mov eax, dword [esp + 0x1c]
push dword [eax + 0x150]
call ebp
test eax, eax
jns 0x1013c129
call edi
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.10120f40
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x1013d580
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x88
mov eax, dword [0x101fd700]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
mov ebx, dword [esp + 0x90]
push ebp
push esi
push edi
mov eax, dword [ebx + 0xc]
mov edi, dword [eax + 0x440]
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0x80
lea eax, [esp + 0x18]
push eax
mov eax, dword [edi + 0x13c]
push 0
add eax, 4
push eax
push dword [edi + 0x148]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [edi + 0x130], 0
mov dword [edi + 0x134], eax
jne 0x1013d606
push dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
lea eax, [edi + 0xb0]
push eax
call fcn.10178960
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [edi + 0x130], eax
mov esi, dword [edi + 0x134]
cmp esi, 4
jge 0x1013d641
push str.Received_too_short_packet
push ebx
call fcn.10120f40
add esp, 8
mov dword [edi + 0xc], 7
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10176fcb
add esp, 0x88
ret
mov edx, dword [edi + 0x148]
movzx eax, byte [edx]
movzx ecx, byte [edx + 1]
shl eax, 8
or ecx, eax
mov dword [edi + 0xc], ecx
dec ecx
cmp ecx, 5
ja case.0x1013d660.1
jmp dword [ecx*4 + 0x1013d76c]
cmp esi, 4
jle case.0x1013d660.4
movzx ecx, byte [edx + 2]
movzx eax, byte [edx + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [edi + 0x144]
inc eax
movzx eax, ax
cmp eax, ecx
jne case.0x1013d660.4
lea eax, [esi - 4]
push eax
lea eax, [edx + 4]
push eax
push 1
push ebx
call fcn.10120e90
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1013d6bb
push 5
push edi
call fcn.1013e080
add esp, 8
mov eax, esi
jmp 0x1013d628
mov eax, dword [edi + 0x134]
sub eax, 4
cdq
add dword [ebx + 0x90], eax
adc dword [ebx + 0x94], edx
push dword [ebx + 0x94]
push dword [ebx + 0x90]
push ebx
call fcn.101274c0
jmp 0x1013d741
movzx ecx, byte [edx + 2]
lea ebp, [edx + 4]
movzx eax, byte [edx + 3]
add esi, 0xfffffffc
shl ecx, 8
or ecx, eax
push esi
push ebp
mov dword [edi + 8], ecx
call fcn.1013e0f0
add esp, 8
cmp eax, esi
jae case.0x1013d660.4
push ebp
push str.TFTP_error:__s
push ebx
call fcn.10121010
jmp 0x1013d741
lea eax, [esi - 2]
push eax
lea eax, [edx + 2]
push eax
push edi
call fcn.1013d330
add esp, 0xc
test eax, eax
je case.0x1013d660.4
jmp 0x1013d628
push str.Internal_error:_Unexpected_packet
push 0x101defbc
push ebx
call fcn.10120f40
add esp, 0xc
push ebx
call fcn.101278c0
add esp, 4
test eax, eax
je 0x1013d626
push 5
push edi
call fcn.1013e080
add esp, 8
mov eax, 0x2a
jmp 0x1013d628
Function at 0x1013fa70
Capabilities:
Convert ip address from string

Disassembly:
sub esp, 0x4c
mov eax, dword [0x101fd700]
xor eax, esp
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x50]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x64]
mov esi, edi
mov dword [esp + 0x10], eax
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x1013fa93
sub esi, ecx
cmp byte [edi], 0x5b
jne 0x1013fc4d
cmp esi, 4
jb 0x1013fc35
inc edi
sub esi, 2
cmp byte [edi + esi], 0x5d
jne 0x1013fc35
push str.0123456789abcdefABCDEF:.
push edi
call fcn.10187f70
add esp, 8
cmp esi, eax
je 0x1013fb8e
mov esi, eax
add eax, edi
mov dword [esp + 0x14], eax
cmp byte [eax], 0x25
jne 0x1013fc35
push 2
lea ebx, [eax + 1]
xor ebp, ebp
push 0x101b8c54
push ebx
call fcn.10187720
add esp, 0xc
test eax, eax
jne 0x1013fb0c
mov cl, byte [ebx + 2]
lea eax, [ebx + 2]
test cl, cl
je 0x1013fb0c
cmp cl, 0x5d
cmovne ebx, eax
mov al, byte [ebx]
test al, al
je 0x1013fc1d
lea ecx, [esp + 0x18]
sub ecx, ebx
nop dword [eax]
cmp al, 0x5d
je 0x1013fb35
cmp ebp, 0xf
jge 0x1013fb35
mov byte [ecx + ebx], al
inc ebp
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x1013fb20
test ebp, ebp
je 0x1013fc1d
cmp byte [ebx], 0x5d
jne 0x1013fc1d
cmp ebp, 0x10
jae 0x1013fc77
lea eax, [esp + 0x18]
mov byte [esp + ebp + 0x18], 0
push eax
call dword [0x101fd2f0]
mov ecx, dword [esp + 0x14]
add esp, 4
mov dword [ecx + 0x14], eax
test eax, eax
jne 0x1013fb85
pop edi
pop esi
pop ebp
mov eax, 7
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.10176fcb
add esp, 0x4c
ret
mov eax, dword [esp + 0x14]
mov word [eax], 0x5d
lea eax, [esp + 0x18]
mov byte [edi + esi], 0
push eax
push edi
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x1013fc35
push 0x2e
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x20]
push eax
push 0x17
call fcn.10146040
add esp, 0x10
test eax, eax
je 0x1013fbfa
lea edx, [esp + 0x28]
lea ecx, [edx + 1]
nop word [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x1013fbd0
sub edx, ecx
cmp edx, esi
jae 0x1013fbfa
lea ecx, [esp + 0x28]
mov esi, edi
mov eax, ecx
sub esi, eax
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x1013fbe7
mov byte [edx + edi + 1], al
mov esi, edx
mov byte [edi + esi], 0x5d
xor eax, eax
mov ecx, 0xe
cmp byte [edi], al
pop edi
pop esi
pop ebp
cmove eax, ecx
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.10176fcb
add esp, 0x4c
ret
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.10176fcb
add esp, 0x4c
ret
pop edi
pop esi
pop ebp
mov eax, 0x16
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.10176fcb
add esp, 0x4c
ret
push str.__r_n_t_:___
push edi
call fcn.1017ce00
add esp, 8
cmp esi, eax
je 0x1013fbfe
mov ecx, dword [esp + 0x58]
mov eax, 0x15
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10176fcb
add esp, 0x4c
ret
call fcn.10177296
int3
Function at 0x10140f70
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x20]
push edi
xor edi, edi
mov dword [esp + 0xc], edi
mov dword [eax], edi
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [esp + 4], eax
test eax, eax
jne 0x101410ff
push esi
mov esi, dword [esp + 0x14]
test esi, esi
je 0x101410ea
push ebx
push ebp
mov eax, dword [esi + 0x14]
test eax, eax
je 0x10140fcc
lea edx, [eax + 1]
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10140fc0
sub eax, edx
inc eax
jmp 0x10140fce
xor eax, eax
mov ecx, dword [esi + 4]
mov dword [esp + 0x14], eax
cmp ecx, 2
jne 0x10140fdf
lea ebp, [ecx + 0xe]
jmp 0x10140feb
cmp ecx, 0x17
jne 0x1014108c
lea ebp, [ecx + 5]
cmp dword [esi + 0x18], 0
je 0x1014108c
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x1014108c
cmp ecx, ebp
jb 0x1014108c
add eax, 0x20
add eax, ebp
push eax
call dword [0x101fd2e4]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x101410db
mov ecx, dword [esi]
mov dword [ebx], ecx
mov ecx, dword [esi + 4]
mov dword [ebx + 4], ecx
mov ecx, dword [esi + 8]
mov dword [ebx + 8], ecx
mov eax, dword [esi + 0xc]
mov dword [ebx + 0xc], eax
lea eax, [ebx + 0x20]
push ebp
mov dword [ebx + 0x10], ebp
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x18], eax
push dword [esi + 0x18]
push eax
call fcn.10178960
mov ecx, dword [esp + 0x20]
add esp, 0xc
test ecx, ecx
je 0x10141078
mov eax, dword [ebx + 0x18]
add eax, ebp
push ecx
mov dword [ebx + 0x14], eax
push dword [esi + 0x14]
push eax
call fcn.10178960
add esp, 0xc
mov eax, dword [esp + 0x18]
test edi, edi
cmove edi, ebx
test eax, eax
je 0x10141088
mov dword [eax + 0x1c], ebx
mov dword [esp + 0x18], ebx
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x10140fb2
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
pop ebp
pop ebx
test eax, eax
je 0x101410ac
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x101410e6
test edi, edi
je 0x101410cb
mov esi, dword [edi + 0x1c]
push edi
call dword [0x101fd2e8]
add esp, 4
mov edi, esi
test esi, esi
jne 0x101410b4
mov esi, dword [esp + 8]
mov eax, dword [esp + 0x28]
xor edi, edi
mov dword [eax], edi
mov eax, esi
pop esi
pop edi
add esp, 0x10
ret
mov esi, 8
mov dword [esp + 0x10], esi
jmp 0x1014109b
test edi, edi
jne 0x101410f6
mov esi, 0x2af9
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x28]
mov dword [eax], edi
mov eax, esi
pop esi
pop edi
add esp, 0x10
ret