joyce8/EMBER2024-capa huggingface dataset:
Function at 0x517990
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, edi
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x5179a0
push dword [ebp + 8]
xorps xmm0, xmm0
mov eax, 2
movups xmmword [ebp - 0x14], xmm0
sub esi, ecx
mov word [ebp - 0x14], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
lea eax, [ebp - 4]
push eax
push str.127.0.0.1
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jge 0x5179e4
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
lea eax, [esi + 0x31]
push 1
push eax
call dword [0x63f154]
mov esi, eax
add esp, 8
test esi, esi
je 0x5179dc
movups xmm0, xmmword [ebp - 0x14]
lea eax, [esi + 0x20]
mov dword [esi], 0
mov dword [esi + 0x18], eax
mov edx, edi
mov dword [esi + 4], 2
mov dword [esi + 8], 1
mov dword [esi + 0xc], 6
mov dword [esi + 0x10], 0x10
movups xmmword [eax], xmm0
mov ecx, dword [esi + 0x18]
add ecx, 0x10
mov dword [esi + 0x14], ecx
nop dword [eax]
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x517a40
push edi
push dword [ebp + 8]
call fcn.00517a70
add esp, 8
mov dword [esi + 0x1c], eax
mov eax, esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x517a70
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x63f070]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
mov ecx, esi
push edi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x517a90
sub ecx, edx
push 1
lea eax, [ecx + 0x3d]
push eax
call dword [0x63f154]
mov edi, eax
add esp, 8
test edi, edi
jne 0x517ac0
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
push dword [ebp + 8]
mov eax, 0x17
mov word [ebp - 0x30], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x2e], ax
lea eax, [ebp - 0x14]
push eax
push 0x5ccde8
push 0x17
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x18], 0
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jl 0x517aae
movups xmm0, xmmword [ebp - 0x14]
push 0x1c
lea ecx, [ebp - 0x30]
mov dword [edi], 0
lea eax, [edi + 0x20]
mov dword [edi + 4], 0x17
push ecx
push eax
movups xmmword [ebp - 0x28], xmm0
mov dword [edi + 8], 1
mov dword [edi + 0xc], 6
mov dword [edi + 0x10], 0x1c
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], eax
call fcn.0057a2f0
mov ecx, dword [edi + 0x18]
add esp, 0xc
add ecx, 0x1c
mov dword [edi + 0x14], ecx
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x517b50
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
Function at 0x521300
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x52131b
cmp dword [edi], 0
jne 0x52132d
test esi, esi
je 0x521324
cmp dword [esi], 0
jne 0x52132d
test ebx, ebx
je 0x521376
cmp dword [ebx], 0
je 0x521376
push dword [ebp + 0x1c]
lea eax, [ebp - 8]
push dword [ebp + 0x18]
push eax
call fcn.00548470
add esp, 0xc
test ebx, ebx
je 0x521348
cmp dword [ebx], 0
jne 0x52134a
xor ebx, ebx
test esi, esi
je 0x521353
cmp dword [esi], 0
jne 0x521355
xor esi, esi
test edi, edi
je 0x52135e
cmp dword [edi], 0
jne 0x521360
xor edi, edi
push eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x18]
mov eax, ecx
mov edx, dword [ebp + 0x1c]
or eax, edx
mov dword [ebp - 4], edx
je 0x5213c2
test edx, edx
jg 0x5213af
jl 0x52138f
test ecx, ecx
jae 0x5213a4
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
test edx, edx
jl 0x5213bb
jg 0x5213af
cmp ecx, 0xffffffff
jb 0x5213bb
mov ecx, 0xfffffffe
mov dword [ebp - 4], 0
push ecx
call dword [sym.imp.KERNEL32.DLL_Sleep]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x524ae0
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
lea eax, [ebp - 0x10]
push edi
push eax
call fcn.00506340
push dword [ebp + 8]
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x10], xmm0
call fcn.00522bf0
push dword [ebp + 0xc]
mov edi, eax
call fcn.00522bf0
mov ebx, dword [sym.imp.KERNEL32.DLL_MoveFileExW]
add esp, 0xc
mov esi, eax
push 1
push esi
push edi
call ebx
test eax, eax
jne 0x524b67
lea eax, [ebp - 0x20]
push eax
call fcn.00506340
movups xmm0, xmmword [ebp - 0x10]
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.005063e0
add esp, 0x20
test edx, edx
ja 0x524b8a
jb 0x524b55
cmp eax, 0x3e8
ja 0x524b8a
push 1
call dword [sym.imp.KERNEL32.DLL_Sleep]
push 1
push esi
push edi
call ebx
test eax, eax
je 0x524b20
test edi, edi
je 0x524b74
push edi
call fcn.0057d798
add esp, 4
test esi, esi
je 0x524b81
push esi
call fcn.0057d798
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x524b97
push edi
call fcn.0057d798
add esp, 4
test esi, esi
je 0x524ba4
push esi
call fcn.0057d798
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x524f90
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
push ebx
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [eax], ebx
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 8], eax
test eax, eax
jne 0x525127
push esi
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x525113
push edi
nop dword [eax]
mov eax, dword [esi + 0x14]
test eax, eax
je 0x524fee
lea edx, [eax + 1]
nop word [eax + eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x524fe0
sub eax, edx
lea ecx, [eax + 1]
jmp 0x524ff0
xor ecx, ecx
mov eax, dword [esi + 4]
mov dword [ebp - 0xc], ecx
cmp eax, 2
jne 0x525002
mov eax, 0x10
jmp 0x525010
cmp eax, 0x17
jne 0x5250b5
mov eax, 0x1c
cmp dword [esi + 0x18], 0
mov dword [ebp - 4], eax
je 0x5250b5
mov edx, dword [esi + 0x10]
test edx, edx
je 0x5250b5
cmp edx, eax
jb 0x5250b5
add ecx, 0x20
add eax, ecx
push eax
call dword [0x63f144]
mov edi, eax
add esp, 4
test edi, edi
je 0x525105
mov ecx, dword [esi]
mov dword [edi], ecx
mov ecx, dword [esi + 4]
mov dword [edi + 4], ecx
mov ecx, dword [esi + 8]
mov dword [edi + 8], ecx
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp - 4]
mov dword [edi + 0xc], eax
lea eax, [edi + 0x20]
push ecx
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], eax
push dword [esi + 0x18]
push eax
call fcn.0057a2f0
mov edx, dword [ebp - 0xc]
add esp, 0xc
test edx, edx
je 0x5250a3
mov eax, dword [edi + 0x18]
add eax, dword [ebp - 4]
push edx
mov dword [edi + 0x14], eax
push dword [esi + 0x14]
push eax
call fcn.0057a2f0
add esp, 0xc
mov eax, dword [ebp - 0x10]
test ebx, ebx
cmove ebx, edi
test eax, eax
je 0x5250b2
mov dword [eax + 0x1c], edi
mov dword [ebp - 0x10], edi
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x524fd0
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
pop edi
test eax, eax
je 0x5250d2
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x52510f
test ebx, ebx
je 0x5250f6
nop word [eax + eax]
mov esi, dword [ebx + 0x1c]
push ebx
call dword [0x63f148]
add esp, 4
mov ebx, esi
test esi, esi
jne 0x5250e0
mov esi, dword [ebp - 8]
mov eax, dword [ebp + 0x14]
xor ebx, ebx
mov dword [eax], ebx
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, 8
mov dword [ebp - 8], esi
jmp 0x5250c3
test ebx, ebx
jne 0x52511f
mov esi, 0x2af9
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp + 0x14]
mov dword [eax], ebx
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x525340
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x63f070]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
push esi
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x525386
push dword [ebp + 0xc]
lea eax, [ebp - 0x18]
push esi
push eax
push 2
call fcn.00525270
add esp, 0x10
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x14]
push eax
push esi
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x5253b8
push dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push esi
push eax
push 0x17
call fcn.00525270
add esp, 0x10
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.004a6edb
mov esp, ebp
pop ebp
ret

Function at 0x525520
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
push 0
call fcn.0057dd1e
add esp, 0x18
test eax, eax
je 0x525542
cmp eax, 0xffffffff
jne 0x525544
xor eax, eax
pop ebp
ret

Function at 0x525590
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov ecx, 0x2b
test edi, edi
je 0x525637
mov esi, dword [ebp + 0xc]
nop dword [eax]
push 4
lea eax, [ebp + 0x10]
mov ebx, 4
push eax
push dword [ebp + 8]
cmp edi, ebx
cmovb ebx, edi
call fcn.0050b7c0
add esp, 0xc
cmp eax, 4
jne 0x5255f5
cmp byte [0x645680], 0
jne 0x525600
push 2
push eax
lea eax, [ebp + 0x10]
mov dword [ebp + 0x10], 0
push eax
push 0
call sub.bcrypt.dll_BCryptGenRandom
neg eax
sbb eax, eax
and eax, 2
mov ecx, eax
test eax, eax
jne 0x525639
mov eax, dword [ebp + 0x10]
jmp 0x52561c
imul eax, dword [0x64567c], 0x41c64e6d
add eax, 0x3039
mov dword [0x64567c], eax
rol eax, 0x10
xor ecx, ecx
mov dword [ebp + 0x10], eax
test ebx, ebx
je 0x52562f
mov byte [esi], al
dec edi
inc esi
shr eax, 8
sub ebx, 1
jne 0x525620
mov dword [ebp + 0x10], eax
test edi, edi
jne 0x5255b0
mov eax, ecx
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x5256f0
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.0057a870
add esp, 0xc
push 2
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
call sub.bcrypt.dll_BCryptGenRandom
neg eax
sbb eax, eax
and eax, 2
pop ebp
ret
Function at 0x5274e0
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
mov esi, dword [ebp + 0x14]
push esi
push 0
push dword [ebp + 0x10]
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 4
mov dword [ebp + 0x14], esi
call fcn.0057a870
add esp, 0xc
lea eax, [ebp - 8]
push 0xf0000040
push dword [ebp + 0x18]
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x5275ae
lea eax, [ebp - 4]
push eax
push 0
push 0
push dword [ebp + 0x1c]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x527590
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x527590
push 0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x527590
cmp esi, dword [ebp - 0xc]
jb 0x527590
push 0
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push 2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov eax, dword [ebp - 4]
test eax, eax
je 0x52759e
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 8]
test eax, eax
je 0x5275ae
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x528750
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.005286c0

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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push 0
mov byte [ebp + 0xa], cl
lea ecx, [ebp + 8]
push 3
mov eax, dword [esi + 0xc]
push ecx
mov byte [ebp + 8], 0xff
mov byte [ebp + 9], bl
push dword [eax + 0x120]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x529fc8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.00511d20
add esp, 0xc
push dword [ebp + 0x10]
push ebx
push str.SENT
push esi
call fcn.00529870
add esp, 0x10
pop esi
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [ebp + 0xc], 0x1f
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax + 0x124]
mov eax, dword [eax + 0xc]
mov dword [ebp - 4], eax
jne 0x52a25e
push edi
lea eax, [ebx + 0x1cb4]
lea edi, [ebx + 0x1eb4]
mov dword [edi], eax
cmp eax, edi
jae 0x52a138
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x52a143
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x52a14e
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ebx + 0x1ca8]
push esi
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
mov word [ebp - 0xc], ax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov ecx, dword [edi]
mov word [ebp - 0x14], ax
cmp ecx, edi
jae 0x52a17e
mov al, byte [ebp - 0xc]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x52a18b
mov al, byte [ebp - 0xb]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x52a198
mov al, byte [ebp - 0x14]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x52a1a5
mov al, byte [ebp - 0x13]
mov byte [ecx], al
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x52a1b0
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x52a1bb
mov byte [eax], 0xf0
inc dword [edi]
mov eax, dword [edi]
lea ecx, [ebx + 0x1cb4]
mov esi, dword [ebp + 8]
mov dword [ebx + 0x1eb8], eax
sub eax, ecx
sub eax, 2
mov dword [edi], ecx
push eax
lea eax, [ebx + 0x1cb6]
push eax
push 0x3e
push esi
call fcn.00529970
add esp, 0x10
lea eax, [ebx + 0x1cb4]
push 0
push 3
push eax
mov eax, dword [ebp - 4]
push dword [eax + 0x120]
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jns 0x52a21b
call edi
push eax
push str.Sending_data_failed___d_
push esi
call fcn.00511d20
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb7]
push eax
push esi
call fcn.00529fe0
add esp, 0xc
lea eax, [ebx + 0x1cbb]
push 0
push 2
push eax
mov eax, dword [ebp - 4]
push dword [eax + 0x120]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x52a25c
call edi
push eax
push str.Sending_data_failed___d_
push esi
call fcn.00511d20
add esp, 0xc
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x52b210
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x63f070]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov eax, dword [ebx + 0xc]
mov edi, dword [eax + 0x378]
lea eax, [ebp - 0x88]
push eax
mov dword [ebp - 0x88], 0x80
lea eax, [ebp - 0x84]
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 0x52b29c
push dword [ebp - 0x88]
lea eax, [ebp - 0x84]
push eax
lea eax, [edi + 0xb0]
push eax
call fcn.0057a2f0
mov eax, dword [ebp - 0x88]
add esp, 0xc
mov dword [edi + 0x130], eax
mov edx, dword [edi + 0x134]
cmp edx, 4
jge 0x52b2cf
push str.Received_too_short_packet
push ebx
call fcn.00511d20
add esp, 8
mov dword [edi + 0xc], 7
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x148]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
mov dword [edi + 0xc], ecx
add ecx, 0xfffffffd
cmp ecx, 3
ja case.default.0x52b2f0
jmp dword [ecx*4 + 0x52b450]
cmp edx, 4
jle case.0x52b2f0.4
mov eax, dword [edi + 0x148]
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [edi + 0x144]
inc eax
movzx eax, ax
cmp eax, ecx
jne case.0x52b2f0.4
lea eax, [edx - 4]
push eax
mov eax, dword [edi + 0x148]
add eax, 4
push eax
push 1
push ebx
call fcn.00511e60
mov esi, eax
add esp, 0x10
test esi, esi
je 0x52b363
push 5
push edi
call fcn.0052bcc0
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
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.0051fe50
jmp 0x52b41a
mov eax, dword [edi + 0x148]
lea esi, [edx - 4]
add eax, 4
mov dword [ebp - 0x8c], eax
mov eax, dword [edi + 0x148]
push esi
push dword [ebp - 0x8c]
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
mov dword [edi + 8], ecx
call fcn.0052bdf0
add esp, 8
cmp eax, esi
jae case.0x52b2f0.4
push dword [ebp - 0x8c]
push str.TFTP_error:__s
push ebx
call fcn.00511de0
jmp 0x52b41a
lea eax, [edx - 2]
push eax
mov eax, dword [edi + 0x148]
add eax, 2
push eax
push edi
call fcn.0052afd0
add esp, 0xc
test eax, eax
je case.0x52b2f0.4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x61ed94
push ebx
call fcn.00511d20
add esp, 0xc
push ebx
call fcn.00520190
add esp, 4
test eax, eax
je 0x52b2bc
push 5
push edi
call fcn.0052bcc0
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 0x2a
pop edi
pop esi
pop ebx
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
Function at 0x52bcc0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [eax + 0x10]
cmp edx, 3
ja case.default.0x52bcd0
jmp dword [edx*4 + 0x52bd24]
mov dword [ebp + 8], eax
pop ebp
jmp fcn.0052b780
mov dword [ebp + 8], eax
pop ebp
jmp fcn.0052b460
mov dword [ebp + 8], eax
pop ebp
jmp fcn.0052bf30
push str.TFTP_finished
push 0x61ed94
push ecx
call fcn.00511de0
add esp, 0xc
xor eax, eax
pop ebp
ret
push str.Internal_state_machine_error
push 0x61ed94
push ecx
call fcn.00511d20
add esp, 0xc
mov eax, 0x47
pop ebp
ret
Function at 0x5362a0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x63f070]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x84]
push eax
mov ebx, dword [edi + 0xc]
mov esi, dword [ebx + 0x124]
push esi
mov dword [ebp - 0x88], 0xffffffff
mov dword [ebp - 0x8c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x536316
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x8c], 0x80
push eax
lea eax, [ebp - 0x84]
push eax
push esi
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebp - 0x88], eax
jmp 0x53631c
mov eax, dword [ebp - 0x88]
cmp eax, 0xffffffff
jne 0x536345
push str.Error_accept__ing_server_connect
push edi
call fcn.00511d20
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
push str.Connection_accepted_from_server
push edi
call fcn.00511de0
mov byte [ebx + 0x1cd], 0
push 1
push dword [ebp - 0x88]
call fcn.00548530
lea eax, [ebp - 0x88]
push eax
push 1
push ebx
push edi
call fcn.0053efd0
add esp, 0x20
test eax, eax
jne 0x5363de
cmp dword [edi + 0x1ac], eax
je 0x5363dc
push 1
push edi
call fcn.00500ab0
mov eax, dword [edi + 0x1ac]
push 1
push dword [ebp - 0x88]
push dword [edi + 0x1b0]
call eax
push 0
push edi
mov esi, eax
call fcn.00500ab0
add esp, 0x1c
test esi, esi
je 0x5363dc
push 1
push edi
call fcn.005114b0
push 1
push ebx
push edi
call fcn.005112d0
add esp, 0x14
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a6edb
mov esp, ebp
pop ebp
ret

Function at 0x538a30
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
lea eax, [ecx - 0xc8]
xor edi, edi
mov ebx, dword [esi + 0xc]
cmp eax, 0x64
jb 0x538a62
push str.Couldnt_set_desired_mode
push esi
call fcn.00511d20
add esp, 8
lea eax, [edi + 0x11]
pop edi
pop esi
pop ebx
pop ebp
ret
cmp ecx, 0xc8
je 0x538a79
push ecx
push str.Got_a__03d_response_code_instead_of_the_assumed_200
push esi
call fcn.00511de0
add esp, 0xc
mov al, byte [ebp + 0x10]
cmp al, 0x13
jne 0x538a91
push ebx
push esi
call fcn.005386d0
add esp, 8
mov edi, eax
pop edi
pop esi
pop ebx
pop ebp
ret
cmp al, 0x14
jne 0x538aa5
push esi
call fcn.00537680
add esp, 4
mov edi, eax
pop edi
pop esi
pop ebx
pop ebp
ret
cmp al, 0x15
jne 0x538abd
push 0xd
push 1
push esi
call fcn.005381e0
add esp, 0xc
mov edi, eax
pop edi
pop esi
pop ebx
pop ebp
ret
cmp al, 0x16
jne 0x538ad0
push 0xe
push 1
push esi
call fcn.005381e0
add esp, 0xc
mov edi, eax
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x53bce0
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x63f070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x48], eax
cmp esi, 4
jae 0x53bd18
pop esi
mov eax, 0x16
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
push edi
inc ebx
sub esi, 2
push str.0123456789abcdefABCDEF:.
push ebx
call fcn.00594b50
add esp, 8
cmp esi, eax
je 0x53bde4
mov dword [ebp - 0x50], eax
add eax, ebx
mov dword [ebp - 0x4c], eax
cmp byte [eax], 0x25
jne 0x53bdfd
push 2
lea esi, [eax + 1]
xor edi, edi
push 0x5d4c3c
push esi
call fcn.005923f0
add esp, 0xc
test eax, eax
jne 0x53bd6d
mov cl, byte [esi + 2]
lea eax, [esi + 2]
test cl, cl
je 0x53bd6d
cmp cl, 0x5d
cmovne esi, eax
mov al, byte [esi]
test al, al
je 0x53bdfd
lea ecx, [ebp - 0x14]
sub ecx, esi
nop dword [eax]
cmp al, 0x5d
je 0x53bd95
cmp edi, 0xf
jge 0x53bd95
mov byte [ecx + esi], al
inc edi
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x53bd80
test edi, edi
je 0x53bdfd
cmp byte [esi], 0x5d
jne 0x53bdfd
cmp edi, 0x10
jae 0x53be6f
lea eax, [ebp - 0x14]
mov byte [ebp + edi - 0x14], 0
push eax
call dword [0x63f150]
mov ecx, dword [ebp - 0x48]
add esp, 4
mov dword [ecx + 0x14], eax
test eax, eax
jne 0x53bdd9
pop edi
pop esi
mov eax, 7
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x50]
mov word [eax], 0x5d
lea eax, [ebp - 0x14]
mov byte [esi + ebx], 0
push eax
push ebx
lea edi, [esi + ebx]
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
je 0x53be13
pop edi
pop esi
mov eax, 0x16
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
push 0x2e
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x17
call sub.WS2_32.dll_inet_ntop
test eax, eax
je 0x53be59
lea edx, [ebp - 0x44]
lea ecx, [edx + 1]
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x53be30
sub edx, ecx
cmp edx, esi
jae 0x53be59
lea ecx, [ebp - 0x44]
mov esi, ebx
mov eax, ecx
sub esi, eax
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x53be46
lea edi, [edx + ebx]
mov byte [edi + 1], al
mov ecx, dword [ebp - 4]
xor eax, eax
mov byte [edi], 0x5d
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004a6edb
mov esp, ebp
pop ebp
ret
call fcn.004a7aaf
int3