joyce8/EMBER2024-capa huggingface dataset:
Function at 0x445120
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, dword [ebp + 0xc]
push edi
xor edi, edi
mov dword [ebp - 4], ecx
mov esi, dword [esi]
and esi, 7
cmp edx, 5
jae 0x445142
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
add dword [ebp + 8], 5
push ebx
lea ebx, [edx - 4]
add ebx, ecx
mov dword [ebp - 8], ebx
nop
lea eax, [edi + ecx]
cmp eax, ebx
jae 0x445169
mov cl, byte [eax]
and cl, 0xfe
cmp cl, 0xe8
je 0x445166
inc eax
cmp eax, ebx
jb 0x445157
mov ecx, dword [ebp - 4]
mov edx, eax
sub edx, edi
mov edi, eax
sub edx, ecx
sub edi, ecx
cmp eax, ebx
jae 0x44525f
cmp edx, 2
jbe 0x445211
xor esi, esi
movzx ebx, byte [eax + 4]
lea ecx, [ebx + 1]
test cl, 0xfe
jne 0x445248
movzx ecx, byte [eax + 3]
shl ebx, 8
or ebx, ecx
movzx ecx, byte [eax + 2]
shl ebx, 8
or ebx, ecx
movzx ecx, byte [eax + 1]
shl ebx, 8
or ebx, ecx
mov ecx, dword [ebp + 8]
add ecx, edi
sub ebx, ecx
test esi, esi
je 0x4451e1
and esi, 6
mov edx, ebx
shl esi, 2
mov ecx, esi
shr edx, cl
inc edx
test dl, 0xfe
jne 0x4451df
mov edx, 0x100
shl edx, cl
mov ecx, dword [ebp + 8]
dec edx
xor ebx, edx
add ecx, edi
sub ebx, ecx
xor esi, esi
mov ecx, ebx
mov byte [eax + 1], bl
shr ecx, 8
mov byte [eax + 2], cl
mov ecx, ebx
shr ebx, 0x18
and bl, 1
shr ecx, 0x10
neg bl
mov byte [eax + 3], cl
mov ecx, dword [ebp - 4]
mov byte [eax + 4], bl
mov eax, 5
mov ebx, dword [ebp - 8]
add edi, eax
jmp 0x445150
mov ecx, edx
shr esi, cl
test esi, esi
je 0x445186
cmp esi, 4
ja 0x44523a
cmp esi, 3
je 0x44523a
mov ecx, esi
shr ecx, 1
movzx ecx, byte [ecx + eax + 1]
inc ecx
test cl, 0xfe
jne 0x445186
mov ecx, dword [ebp - 4]
or esi, 8
shr esi, 1
inc edi
jmp 0x445150
mov ebx, dword [ebp - 8]
or esi, 8
mov ecx, dword [ebp - 4]
mov eax, 1
shr esi, 1
add edi, eax
jmp 0x445150
mov eax, dword [ebp + 0xc]
mov ecx, edx
shr esi, cl
xor ecx, ecx
cmp edx, 2
pop ebx
cmovbe ecx, esi
mov dword [eax], ecx
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x44ed70
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x44ee1f
push esi
call fcn.0046b8c0
add esp, 4
test al, al
jne 0x44ee1f
push ebx
push edi
mov edi, esi
xor ebx, ebx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x44ed97
sub edi, ecx
push edi
push 0x2e
push esi
call fcn.00475620
add esp, 0xc
test eax, eax
je 0x44edcb
sub eax, esi
push eax
push 0x2e
push esi
call fcn.00475620
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x44edcd
inc ebx
mov ecx, esi
sub ecx, ebx
add edi, ecx
test ebx, ebx
cmovne esi, ebx
lea ebx, [esi + edi]
mov edi, 0x1505
cmp esi, ebx
jae 0x44edfe
nop dword [eax]
mov al, byte [esi]
push eax
call fcn.00464590
movsx ecx, al
inc esi
mov eax, edi
add esp, 4
shl eax, 5
add eax, edi
xor ecx, eax
mov edi, ecx
cmp esi, ebx
jb 0x44ede0
mov eax, 0x4104105
mov esi, edi
mul edi
sub esi, edx
shr esi, 1
add esi, edx
shr esi, 5
mov ecx, esi
shl ecx, 6
sub ecx, esi
sub edi, ecx
mov eax, edi
pop edi
pop ebx
pop esi
ret
xor eax, eax
pop esi
ret
Function at 0x460ff0
Capabilities:
Get common file path

Disassembly:
push ecx
push ebx
push edi
push 0x527144
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
test ebx, ebx
jne 0x46100a
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 0x527160
push esi
call fcn.004fce70
add esp, 8
test eax, eax
je 0x461052
test ebp, ebp
je 0x461043
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 0x461078
push str.AddDllDirectory
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x461078
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 0x46112f
mov ecx, esi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x461095
sub ecx, ebx
lea eax, [edx + 1]
add eax, ecx
push eax
call dword [section..data]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x461125
push dword [esp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x461125
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4610c7
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 0x4610e0
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 0x4610f0
test ebp, ebp
je 0x46111c
push 8
push 0
push ebx
call ebp
push ebx
mov edi, eax
call dword [0x55e004]
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 [0x55e004]
add esp, 4
pop esi
pop ebp
mov eax, edi
pop edi
pop ebx
pop ecx
ret
Function at 0x465d80
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
mov eax, dword [0x56370c]
mov dword [esp + 4], 0x4020
mov dword [esp], 0
mov dword [esp + 8], 4
test eax, eax
jne 0x465dd1
push 3
push 2
push eax
push eax
push 6
call fcn.00495770
add esp, 0x14
test al, al
je 0x465dc5
mov dword [0x56370c], 2
add esp, 0xc
ret
mov dword [0x56370c], 1
jmp 0x465dd6
cmp eax, 2
je 0x465e1c
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 0x465e01
mov eax, dword [esp]
cmp eax, dword [esp + 4]
jg 0x465e1c
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 0x4668b0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x188
mov eax, dword [0x55e904]
xor eax, esp
mov dword [esp + 0x184], eax
mov eax, dword [esp + 0x18c]
push ebx
mov ebx, dword [esp + 0x194]
push esi
mov esi, dword [eax + 8]
push edi
mov edi, dword [esi + 0x98]
cmp edi, 0xffffffff
je 0x4669e8
mov eax, dword [ebx + 0x18]
mov eax, dword [eax + 0x2b4]
test dword [eax + 0x48], 0x800
jne 0x4669e8
push 0x80
lea eax, [esp + 0x14]
mov dword [esp + 0x10], 0x80
push 0
push eax
call fcn.004f05a0
add esp, 0xc
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x14]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x466976
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x90]
push 0x100
push eax
push esi
call fcn.00445e50
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.0045d5d0
add esp, 0x1c
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x184]
xor ecx, esp
call fcn.004ee450
add esp, 0x188
ret
lea eax, [esi + 0xfc]
push eax
lea eax, [esi + 0xca]
push eax
push dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
call fcn.0045fb10
add esp, 0x10
test al, al
jne 0x4669e8
call fcn.004f94ad
mov esi, dword [eax]
call fcn.004f94ad
mov edi, eax
lea eax, [esp + 0x90]
push 0x100
push eax
push esi
call fcn.00445e50
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.0045d5d0
add esp, 0x1c
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x184]
xor ecx, esp
call fcn.004ee450
add esp, 0x188
ret
mov ecx, dword [esp + 0x190]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004ee450
add esp, 0x188
ret
Function at 0x46ba70
Capabilities:
Create udp socket

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x46bab7
mov eax, dword [esi + 0x88]
cmp byte [eax + 0x164], 0
jne 0x46baab
push 0
call fcn.0046ba70
add esp, 4
test al, al
mov eax, dword [esi + 0x88]
setne cl
inc cl
mov byte [eax + 0x164], cl
mov eax, dword [esi + 0x88]
cmp byte [eax + 0x164], 2
pop esi
sete al
ret
push 0
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x46bacc
xor al, al
pop esi
ret
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, 1
pop esi
ret

Function at 0x46c7e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x6c
mov eax, dword [0x55e904]
xor eax, esp
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x70]
push ebp
mov ebp, dword [esp + 0x78]
push edi
xor edi, edi
mov dword [esp + 8], eax
cmp byte [eax + 0x6b2], 0
je 0x46c9c2
cmp byte [ebp + 0x18], 0
push ebx
lea ebx, [ebp + 0x18]
je 0x46c9c1
lea eax, [esp + 0x30]
push eax
push ebx
push 2
call fcn.0047c4e0
add esp, 0xc
test eax, eax
jg 0x46c9c1
lea eax, [esp + 0x34]
push eax
push ebx
push 0x17
call fcn.0047c4e0
add esp, 0xc
test eax, eax
jg 0x46c9c1
cmp byte [ebx], 0
mov eax, str._none_
push esi
push dword [ebp + 0x14]
mov esi, dword [ebp]
cmovne eax, ebx
mov ebp, dword [esp + 0x14]
push eax
push str.Host__s:_d_was_resolved.
push ebp
call fcn.0045d6a0
lea eax, [esp + 0x24]
push 0x400
push eax
call fcn.0044fd40
lea eax, [esp + 0x3c]
push 0x400
push eax
call fcn.0044fd40
add esp, 0x20
test esi, esi
je 0x46c934
lea edx, [edi + 0x10]
mov ecx, dword [esi + 4]
cmp ecx, 0x17
je 0x46c8a8
cmp ecx, 2
jne 0x46c929
xor eax, eax
mov byte [esp + 0x48], 0
cmp ecx, 2
lea ebx, [esp + 0x14]
cmovne eax, edx
add ebx, eax
sub ecx, 2
je 0x46c8d7
sub ecx, 0x15
jne 0x46c8ef
push 0x2e
lea eax, [esp + 0x4c]
push eax
mov eax, dword [esi + 0x18]
add eax, 8
push eax
push 0x17
jmp 0x46c8e7
push 0x2e
lea eax, [esp + 0x4c]
push eax
mov eax, dword [esi + 0x18]
add eax, 4
push eax
push 2
call fcn.004946e0
add esp, 0x10
push ebx
call fcn.0044dd10
add esp, 4
test eax, eax
je 0x46c90e
push 2
push 0x526810
push ebx
call fcn.0044fd00
add esp, 0xc
mov edi, eax
test edi, edi
jne 0x46c954
lea eax, [esp + 0x48]
push eax
push ebx
call fcn.0044fca0
mov edi, eax
add esp, 8
test edi, edi
jne 0x46c954
lea edx, [eax + 0x10]
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x46c897
lea eax, [esp + 0x24]
push eax
call fcn.0044dd10
add esp, 4
test eax, eax
je 0x46c964
lea eax, [esp + 0x24]
push eax
call fcn.0044dc60
add esp, 4
jmp 0x46c969
push str.too_many_IP__cannot_show
push ebp
call fcn.0045d6a0
add esp, 8
jmp 0x46c9a9
mov eax, str._none_
push eax
push str.IPv6:__s
push ebp
call fcn.0045d6a0
lea eax, [esp + 0x20]
push eax
call fcn.0044dd10
add esp, 0x10
test eax, eax
je 0x46c995
lea eax, [esp + 0x14]
push eax
call fcn.0044dc60
add esp, 4
jmp 0x46c99a
mov eax, str._none_
push eax
push str.IPv4:__s
push ebp
call fcn.0045d6a0
add esp, 0xc
lea eax, [esp + 0x14]
push eax
call fcn.0044fd10
lea eax, [esp + 0x28]
push eax
call fcn.0044fd10
add esp, 8
pop esi
pop ebx
mov ecx, dword [esp + 0x70]
pop edi
pop ebp
xor ecx, esp
call fcn.004ee450
add esp, 0x6c
ret
Function at 0x475d70
Capabilities:
Move file

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
lea eax, [esp + 0xc]
push edi
push eax
call fcn.0046acf0
push dword [esp + 0x38]
movups xmm0, xmmword [eax]
movups xmmword [esp + 0x18], xmm0
call fcn.0050b597
push dword [esp + 0x40]
mov edi, eax
call fcn.0050b597
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 0x475e05
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
nop dword [eax + eax]
lea eax, [esp + 0x20]
push eax
call fcn.0046acf0
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.0046ada0
add esp, 0x20
test edx, edx
ja 0x475e29
jb 0x475df7
cmp eax, 0x3e8
ja 0x475e29
push 1
call ebp
push 1
push esi
push edi
call ebx
test eax, eax
je 0x475dc0
test edi, edi
je 0x475e12
push edi
call fcn.004f8e88
add esp, 4
test esi, esi
je 0x475e1f
push esi
call fcn.004f8e88
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
test edi, edi
je 0x475e36
push edi
call fcn.004f8e88
add esp, 4
test esi, esi
je 0x475e43
push esi
call fcn.004f8e88
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret
Function at 0x476340
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x20]
push ebx
xor ebx, ebx
mov dword [esp + 0xc], ebx
mov dword [eax], ebx
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 0x4764d1
push esi
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4764bc
push ebp
push edi
mov eax, dword [esi + 0x14]
test eax, eax
je 0x47639e
lea edx, [eax + 1]
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x476390
sub eax, edx
lea ecx, [eax + 1]
jmp 0x4763a0
xor ecx, ecx
mov eax, dword [esi + 4]
mov dword [esp + 0x14], ecx
cmp eax, 2
jne 0x4763b1
lea ebp, [eax + 0xe]
jmp 0x4763bd
cmp eax, 0x17
jne 0x47645e
lea ebp, [eax + 5]
cmp dword [esi + 0x18], 0
je 0x47645e
mov eax, dword [esi + 0x10]
test eax, eax
je 0x47645e
cmp eax, ebp
jb 0x47645e
lea eax, [ecx + 0x20]
add eax, ebp
push eax
call dword [section..data]
mov edi, eax
add esp, 4
test edi, edi
je 0x4764ad
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 dword [edi + 0xc], eax
lea eax, [edi + 0x20]
push ebp
mov dword [edi + 0x10], ebp
mov dword [edi + 0x14], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], eax
push dword [esi + 0x18]
push eax
call fcn.004f0970
mov ecx, dword [esp + 0x20]
add esp, 0xc
test ecx, ecx
je 0x47644a
mov eax, dword [edi + 0x18]
add eax, ebp
push ecx
mov dword [edi + 0x14], eax
push dword [esi + 0x14]
push eax
call fcn.004f0970
add esp, 0xc
mov eax, dword [esp + 0x18]
test ebx, ebx
cmove ebx, edi
test eax, eax
je 0x47645a
mov dword [eax + 0x1c], edi
mov dword [esp + 0x18], edi
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x476382
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
pop edi
pop ebp
test eax, eax
je 0x47647e
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x4764b8
test ebx, ebx
je 0x47649d
mov esi, dword [ebx + 0x1c]
push ebx
call dword [0x55e004]
add esp, 4
mov ebx, esi
test esi, esi
jne 0x476486
mov esi, dword [esp + 8]
mov eax, dword [esp + 0x28]
xor ebx, ebx
mov dword [eax], ebx
mov eax, esi
pop esi
pop ebx
add esp, 0x10
ret
mov esi, 8
mov dword [esp + 0x10], esi
jmp 0x47646d
test ebx, ebx
jne 0x4764c8
mov esi, 0x2af9
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x28]
mov dword [eax], ebx
mov eax, esi
pop esi
pop ebx
add esp, 0x10
ret

Function at 0x478690
Capabilities:
Generate random numbers via winapi

Disassembly:
push dword [esp + 8]
push 0
push dword [esp + 0xc]
call fcn.004f05a0
add esp, 0xc
push 2
push dword [esp + 0xc]
push dword [esp + 0xc]
push 0
call sub.bcrypt.dll_BCryptGenRandom
neg eax
sbb eax, eax
and eax, 2
ret
Function at 0x47c0b0
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 [0x55e008]
mov edi, eax
add esp, 8
test edi, edi
je 0x47c107
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 0x47c11f
cmp esi, ebx
je 0x47c11f
cmp esi, 0x8000
ja 0x47c11f
cmp esi, ebx
jb 0x47c118
push esi
push edi
call dword [0x55e008]
mov edi, eax
add esp, 8
test edi, edi
jne 0x47c0d0
push ebp
call dword [0x55e004]
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 [0x55e004]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x47d880
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 + 0x18]
push ecx
mov byte [esp + 0x18], 0xff
mov byte [esp + 0x19], bl
push dword [eax + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x47d8cc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.0045d5d0
add esp, 0xc
push dword [esp + 0x14]
push ebx
push str.SENT
push esi
call fcn.0047d4a0
add esp, 0x10
pop esi
pop ebx
ret
Function at 0x47da30
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
cmp dword [esp + 0xc], 0x1f
push ebx
mov ebx, dword [esp + 0xc]
push ebp
mov eax, dword [ebx + 0x18]
mov ebp, dword [ebx + 0x130]
mov dword [esp + 8], eax
jne 0x47db7f
push esi
push edi
lea eax, [ebp + 0x1c2c]
lea edi, [ebp + 0x1e2c]
mov dword [edi], eax
cmp eax, edi
jae 0x47da7d
mov byte [eax], 0xff
inc eax
mov dword [edi], eax
cmp eax, edi
jae 0x47da7d
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x47da7d
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ebp + 0x1c10]
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
movzx eax, ax
mov dword [esp + 0x18], eax
movzx eax, word [ebp + 0x1c12]
push eax
call esi
mov edx, dword [esp + 0x18]
movzx ecx, ax
mov eax, dword [edi]
cmp eax, edi
jae 0x47dae7
mov byte [eax], dl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x47dae7
mov byte [eax], dh
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x47dae7
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x47dae7
shr ecx, 8
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x47dae7
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x47dae7
mov byte [eax], 0xf0
mov eax, dword [edi]
inc eax
mov dword [ebp + 0x1e30], eax
lea esi, [ebp + 0x1c2c]
sub eax, esi
mov dword [edi], esi
sub eax, 2
push eax
lea eax, [ebp + 0x1c2e]
push eax
push 0x3e
push ebx
call fcn.0047d5a0
mov eax, dword [esp + 0x20]
add esp, 0x10
mov edi, dword [sym.imp.WS2_32.dll_send]
push 0
push 3
push esi
push dword [eax + 0x1a8]
call edi
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jns 0x47db3f
call esi
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.0045d5d0
add esp, 0xc
push 4
lea eax, [ebp + 0x1c2f]
push eax
push ebx
call fcn.0047d8f0
add esp, 0xc
lea eax, [ebp + 0x1c33]
push 0
push 2
push eax
mov eax, dword [esp + 0x1c]
push dword [eax + 0x1a8]
call edi
test eax, eax
jns 0x47db7d
call esi
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.0045d5d0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x47db90
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x80c
mov eax, dword [0x55e904]
xor eax, esp
mov dword [esp + 0x808], eax
push ebx
mov ebx, dword [esp + 0x814]
push ebp
push esi
mov dword [esp + 0xc], ebx
mov esi, dword [ebx + 0x130]
mov ebp, dword [ebx + 0x18]
mov dword [esp + 0x10], ebp
mov eax, dword [esi + 0x1e30]
sub eax, dword [esi + 0x1e2c]
add eax, 2
push eax
lea eax, [esi + 0x1c2c]
push eax
push 0x3c
push ebx
call fcn.0047d5a0
mov eax, dword [esi + 0x1e2c]
add esp, 0x10
mov cl, byte [eax]
inc eax
mov dword [esi + 0x1e2c], eax
cmp cl, 0x18
je 0x47dd68
cmp cl, 0x23
je 0x47dd45
cmp cl, 0x27
jne 0x47ddf0
push edi
push 0
push 0x27
push 0xfa
push 0xff
push str._c_c_c_c
lea eax, [esp + 0x2c]
push 0x800
push eax
call fcn.00462f30
mov esi, dword [esi + 0x1c18]
add esp, 0x1c
mov edi, 4
test esi, esi
je 0x47dcc5
mov edx, dword [esi]
mov ecx, edx
lea ebx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x47dc50
sub ecx, ebx
lea eax, [edi + 1]
add eax, ecx
cmp eax, 0x7fa
jae 0x47dcb6
push 0x2c
push edx
call fcn.004f0700
mov ebx, 0x800
lea ebp, [esp + 0x20]
mov edx, eax
add esp, 8
sub ebx, edi
add ebp, edi
test edx, edx
jne 0x47dc97
push dword [esi]
push eax
push 0x52bb20
push ebx
push ebp
call fcn.00462f30
add esp, 0x14
jmp 0x47dcb4
mov ecx, dword [esi]
lea eax, [edx + 1]
push eax
push 1
push ecx
sub edx, ecx
push edx
push 0
push str._c_.s_c_s
push ebx
push ebp
call fcn.00462f30
add esp, 0x20
add edi, eax
mov esi, dword [esi + 4]
test esi, esi
jne 0x47dc44
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
push 0xf0
push 0xff
mov eax, 0x800
sub eax, edi
push str._c_c
push eax
lea eax, [esp + 0x28]
add eax, edi
push eax
call fcn.00462f30
add esp, 0x14
lea eax, [edi + 2]
push 0
push eax
lea eax, [esp + 0x20]
push eax
push dword [ebp + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x47dd1b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.0045d5d0
add esp, 0xc
push edi
lea eax, [esp + 0x1e]
push eax
push 0x3e
push ebx
call fcn.0047d5a0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x808]
xor ecx, esp
call fcn.004ee450
add esp, 0x80c
ret
mov edx, dword [esi + 0x1c0c]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x47dd50
push 0xf0
push 0xff
push edx
push 0
push 0x23
jmp 0x47dd89
mov edx, dword [esi + 0x1c08]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x47dd73
push 0xf0
push 0xff
push edx
push 0
push 0x18
push 0xfa
push 0xff
push str._c_c_c_c_s_c_c
sub ecx, esi
lea eax, [esp + 0x34]
push 0x800
push eax
lea esi, [ecx + 6]
call fcn.00462f30
add esp, 0x28
lea eax, [esp + 0x14]
push 0
push esi
push eax
push dword [ebp + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x47dddc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.0045d5d0
add esp, 0xc
lea eax, [esi - 2]
push eax
lea eax, [esp + 0x1a]
push eax
push 0x3e
push ebx
call fcn.0047d5a0
add esp, 0x10
mov ecx, dword [esp + 0x814]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ee450
add esp, 0x80c
ret
Function at 0x47ef70
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
xor ebx, ebx
push esi
push edi
mov eax, dword [ebp + 0x18]
mov edi, dword [eax + 0x438]
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 0x80
lea eax, [edi + 0xb0]
push eax
mov eax, dword [edi + 0x13c]
push ebx
add eax, 4
push eax
push dword [edi + 0x148]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov esi, eax
mov dword [edi + 0x134], esi
mov eax, dword [esp + 0x18]
mov dword [edi + 0x130], eax
cmp esi, 4
jge 0x47efe6
push str.Received_too_short_packet
push ebp
call fcn.0045d5d0
add esp, 8
mov dword [edi + 0xc], 7
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
pop ecx
ret
mov edx, dword [edi + 0x148]
movzx ecx, byte [edx]
movzx eax, byte [edx + 1]
shl ecx, 8
or ecx, eax
mov dword [edi + 0xc], ecx
dec ecx
cmp ecx, 5
ja case.0x47f005.1
jmp dword [ecx*4 + 0x47f0f4]
cmp esi, 4
jle case.0x47f005.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.0x47f005.4
lea eax, [esi - 4]
push eax
lea eax, [edx + 4]
push eax
push 1
push ebp
call fcn.0045e8f0
mov ebx, eax
add esp, 0x10
test ebx, ebx
je case.0x47f005.4
push 5
push edi
call fcn.0047f9f0
add esp, 8
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
movzx ecx, byte [edx + 2]
lea eax, [edx + 4]
mov dword [esp + 0x10], eax
add esi, 0xfffffffc
movzx eax, byte [edx + 3]
shl ecx, 8
or ecx, eax
lea eax, [edx + 4]
push esi
push eax
mov dword [edi + 8], ecx
call fcn.0047fa60
add esp, 8
cmp eax, esi
jae case.0x47f005.4
push dword [esp + 0x10]
push str.TFTP_error:__s
push ebp
call fcn.0045d6a0
jmp 0x47f0ca
lea eax, [esi - 2]
push eax
lea eax, [edx + 2]
push eax
push edi
call fcn.0047ed20
mov ebx, eax
add esp, 0xc
test ebx, ebx
je case.0x47f005.4
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push str.Internal_error:_Unexpected_packet
push 0x523e18
push ebp
call fcn.0045d5d0
add esp, 0xc
push ebp
call fcn.00473c00
add esp, 4
test eax, eax
je 0x47efde
push 5
push edi
call fcn.0047f9f0
add esp, 8
mov eax, 0x2a
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret