joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406b50
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x449f78
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x45a770]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
xor eax, eax
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], 0
mov word [ebp - 0x48], ax
cmp word [esi], ax
jne 0x406b9b
xor ecx, ecx
jmp 0x406baf
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406ba0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x48]
call fcn.00403870
sub esp, 8
mov dword [ebp - 4], 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x5c
lea ecx, [ebp - 0x48]
push eax
call fcn.0040d2d0
push eax
push 0
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x48]
call fcn.00402540
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
push 0
cmovae eax, dword [ebp - 0x30]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
call esi
cmp dword [edi], 0xffffffff
je 0x406c27
xor esi, esi
jmp 0x406c2b
call esi
mov esi, eax
cmp dword [ebp - 0x1c], 8
jb 0x406c3c
push dword [ebp - 0x30]
call fcn.00430ba0
add esp, 4
xor eax, eax
mov dword [ebp - 0x1c], 7
cmp dword [ebp - 0x34], 8
mov dword [ebp - 0x20], 0
mov word [ebp - 0x30], ax
jb 0x406c61
push dword [ebp - 0x48]
call fcn.00430ba0
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret

Function at 0x406cb0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x45a770]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
mov dword [ebp - 0xc], ecx
mov esi, dword [edi]
test esi, esi
je 0x406d1f
mov dword [edi], 0
mov edx, 0x400000
lea esp, [esp]
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
cmp esi, 0x400000
mov eax, esi
cmova eax, edx
push eax
push ebx
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 8]
add ebx, ecx
add dword [edi], ecx
sub esi, ecx
test eax, eax
je 0x406d32
test ecx, ecx
je 0x406d1f
mov ecx, dword [ebp - 0xc]
mov edx, 0x400000
test esi, esi
jne 0x406ce0
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
Function at 0x406d50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x45a770]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
mov dword [ebp - 0xc], ecx
mov esi, dword [edi]
test esi, esi
je 0x406dbf
mov dword [edi], 0
mov edx, 0x400000
lea esp, [esp]
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
cmp esi, 0x400000
mov eax, esi
cmova eax, edx
push eax
push ebx
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 8]
add ebx, ecx
add dword [edi], ecx
sub esi, ecx
test eax, eax
je 0x406dd2
test ecx, ecx
je 0x406dbf
mov ecx, dword [ebp - 0xc]
mov edx, 0x400000
test esi, esi
jne 0x406d80
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
Function at 0x40c850
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0xc]
push edi
xor edi, edi
mov dword [ebp - 4], ecx
mov eax, dword [eax]
and eax, 7
cmp edx, 5
jae 0x40c870
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
push ebx
add edx, 0xfffffffc
or ebx, 0xffffffff
add edx, ecx
push esi
mov dword [ebp - 8], edx
lea ecx, [ecx]
lea esi, [edi + ecx]
cmp esi, edx
jae 0x40c899
mov cl, byte [esi]
and cl, 0xfe
cmp cl, 0xe8
je 0x40c896
inc esi
cmp esi, edx
jb 0x40c887
mov ecx, dword [ebp - 4]
mov edi, esi
sub edi, ecx
mov ecx, edi
sub ecx, ebx
cmp esi, edx
jae 0x40c9a1
cmp ecx, 3
jbe 0x40c8b2
xor eax, eax
jmp 0x40c8f0
dec ecx
shl eax, cl
and eax, 7
je 0x40c8f0
movzx ecx, byte [eax + 0x4512c0]
mov edx, esi
sub edx, ecx
cmp byte [eax + 0x4512c8], 0
mov cl, byte [edx + 4]
je 0x40c8da
test cl, cl
je 0x40c8da
cmp cl, 0xff
jne 0x40c8ed
mov edx, dword [ebp - 8]
and eax, 3
mov ecx, dword [ebp - 4]
add eax, eax
mov ebx, edi
or eax, 1
inc edi
jmp 0x40c880
mov edx, dword [ebp - 8]
mov cl, byte [esi + 4]
mov ebx, edi
mov dword [ebp - 0x10], ebx
test cl, cl
je 0x40c912
cmp cl, 0xff
je 0x40c912
mov ecx, dword [ebp - 4]
and eax, 3
add eax, eax
or eax, 1
inc edi
jmp 0x40c880
movzx edx, cl
movzx ecx, byte [esi + 3]
shl edx, 8
or edx, ecx
movzx ecx, byte [esi + 2]
shl edx, 8
or edx, ecx
movzx ecx, byte [esi + 1]
shl edx, 8
or edx, ecx
sub edx, edi
lea ebx, [edx - 5]
test eax, eax
je 0x40c96e
movzx edx, byte [eax + 0x4512c0]
mov ecx, 0x18
shl edx, 3
sub ecx, edx
mov dword [ebp - 0xc], edx
mov edx, ebx
shr edx, cl
test dl, dl
je 0x40c95a
cmp dl, 0xff
jne 0x40c96e
mov ecx, 0x20
mov edx, 1
sub ecx, dword [ebp - 0xc]
shl edx, cl
dec edx
xor edx, ebx
jmp 0x40c930
mov edx, dword [ebp - 8]
mov ecx, ebx
shr ecx, 0x18
and cl, 1
mov byte [esi + 1], bl
dec cl
not cl
mov byte [esi + 4], cl
mov ecx, ebx
shr ecx, 0x10
mov byte [esi + 3], cl
mov ecx, ebx
mov ebx, dword [ebp - 0x10]
shr ecx, 8
add edi, 5
mov byte [esi + 2], cl
mov ecx, dword [ebp - 4]
jmp 0x40c880
pop esi
pop ebx
cmp ecx, 3
jbe 0x40c9b6
mov ecx, dword [ebp + 0xc]
xor eax, eax
mov dword [ecx], eax
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
dec ecx
shl eax, cl
mov ecx, dword [ebp + 0xc]
and eax, 7
mov dword [ecx], eax
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x40e8d0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x45a770]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
xor eax, eax
push edi
push 4
mov edi, edx
cmp byte [esi + 0x3dc], al
setne al
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x40e92b
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.00410c50
add esp, 0xc
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x3e0]
mov dword [ebp - 0x14], 1
call fcn.00415400
mov ecx, dword [esi + 0x3e4]
imul eax, eax, 0x3e8
mov dword [ebp - 0x10], eax
call fcn.00415400
imul eax, eax, 0x3e8
push 0
push 0
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x14]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x40e995
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.00410c50
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
Function at 0x40f0a0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x45a770]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
cmp dword [edi + 0x8c], 2
mov ebx, dword [edi]
je 0x40f266
cmp byte [edi + 0x1c1], 0
jne 0x40f25f
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x80
push eax
lea eax, [ebp - 0x108]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x40f125
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.00429530
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.00410cd0
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
push 0x80
lea eax, [ebp - 0x88]
mov dword [ebp - 8], 0x80
push 0
push eax
call fcn.00435c90
add esp, 0xc
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x88]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x40f18a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.00429530
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.00410cd0
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
lea eax, [edi + 0xe8]
lea esi, [edi + 0xb8]
push eax
mov edx, esi
lea ecx, [ebp - 0x108]
call fcn.0040f040
add esp, 4
test al, al
jne 0x40f1dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.00429530
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.00410cd0
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
movdqu xmm0, xmmword [esi]
mov eax, dword [esi + 0x28]
lea edx, [edi + 0xec]
lea ecx, [ebp - 0x88]
movdqu xmmword [edi + 0x58], xmm0
movdqu xmm0, xmmword [esi + 0x10]
movdqu xmmword [edi + 0x68], xmm0
movq xmm0, qword [esi + 0x20]
movq qword [edi + 0x78], xmm0
mov dword [edi + 0x80], eax
mov ax, word [esi + 0x2c]
mov word [edi + 0x84], ax
lea eax, [edi + 0x11c]
push eax
call fcn.0040f040
add esp, 4
test al, al
jne 0x40f25f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.00429530
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.00410cd0
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
mov ecx, edi
call fcn.0040ef80
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
Function at 0x40f5c0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x45a770]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, ecx
push 4
mov esi, dword [edi]
movzx eax, byte [esi + 0x2e6]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 1
push 6
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x40f623
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov ecx, edi
call fcn.00429530
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.00410c50
add esp, 0xc
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.00410c50
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
pop edi
pop esi
call fcn.00430ba5
mov esp, ebp
pop ebp
ret

Function at 0x40f650
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
mov eax, dword [0x45a770]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x45eb1c]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 4
push esi
push edi
mov edi, ecx
test eax, eax
jne 0x40f715
push 0x11c
push eax
lea eax, [ebp - 0x130]
push eax
call fcn.00435c90
mov esi, dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
add esp, 0xc
mov dword [ebp - 0x130], 0x11c
mov dword [ebp - 0x12c], 6
push 3
push 2
push 0
push 0
call esi
push 3
push 1
push edx
push eax
call esi
push 3
push 0x20
push edx
push eax
call esi
push 3
push 0x10
push edx
push eax
call esi
push edx
push eax
push 0x33
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
test eax, eax
je 0x40f709
mov dword [0x45eb1c], 2
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
mov dword [0x45eb1c], 1
jmp 0x40f71a
cmp eax, 2
je 0x40f756
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x40f73f
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 8]
jg 0x40f756
push 4
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
Function at 0x410a50
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x320
mov eax, dword [0x45a770]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
push edi
test esi, esi
je 0x410a7c
xor eax, eax
mov edi, edi
cmp dword [esi + eax*8], 0xffffffff
jne 0x410a95
inc eax
cmp eax, 1
jb 0x410a70
or ecx, 0xffffffff
call fcn.004106d0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [ebp - 0x218], 0
mov word [esi + 6], ax
or edx, 0xffffffff
mov eax, dword [esi]
mov dword [ebp - 0x110], 0
mov dword [ebp - 0x320], 0
cmp eax, 0xffffffff
je 0x410a7c
movzx ecx, word [esi + 4]
test cl, 7
je 0x410a7c
cmp eax, 0xffffffff
cmova edx, eax
test cl, 1
je 0x410ae7
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x218], 1
test cl, 4
je 0x410afc
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x110], 1
test cl, 2
je 0x410b11
mov dword [ebp - 0x31c], eax
mov dword [ebp - 0x320], 1
cmp dword [ebp - 0x218], 0
jne 0x410b30
cmp dword [ebp - 0x110], 0
jne 0x410b30
cmp dword [ebp - 0x320], 0
je 0x410a7c
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ebx, [edx + 1]
lea esp, [esp]
xor ecx, ecx
lea eax, [ebp - 0x320]
cmp dword [ebp - 0x320], ecx
push 0
cmove eax, ecx
cmp dword [ebp - 0x110], ecx
push eax
lea eax, [ebp - 0x110]
cmove eax, ecx
cmp dword [ebp - 0x218], ecx
push eax
lea eax, [ebp - 0x218]
cmove eax, ecx
push eax
push ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x410baa
call edi
test eax, eax
je 0x410b40
cmp dword [0x45eb20], 0
jne 0x410bae
cmp eax, 0x2714
je 0x410b40
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
test eax, eax
jns 0x410bc2
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
jne 0x410bd7
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
xor eax, eax
xor edi, edi
mov word [esi + 6], ax
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x410c33
mov ebx, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
lea ecx, [ebp - 0x218]
push ecx
push eax
call ebx
test eax, eax
je 0x410bff
or word [esi + 6], 1
lea eax, [ebp - 0x110]
push eax
push dword [esi]
call ebx
test eax, eax
je 0x410c13
or word [esi + 6], 4
lea eax, [ebp - 0x320]
push eax
push dword [esi]
call ebx
test eax, eax
je 0x410c27
or word [esi + 6], 2
cmp word [esi + 6], di
mov eax, 1
cmovne edi, eax
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
Function at 0x410ec0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ecx + eax*4 + 0x154]
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [ebp + 0x18]
mov esi, eax
mov dword [edi], 0
cmp esi, 0xffffffff
jne 0x410f3e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x2733
jne 0x410f0e
mov dword [edi], 0x51
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
mov ecx, dword [ebp + 8]
mov edx, ebx
call fcn.00429530
push eax
mov eax, dword [ebp + 8]
push str.Send_failure:__s
push dword [eax]
call fcn.00410cd0
mov eax, dword [ebp + 8]
add esp, 0xc
mov eax, dword [eax]
mov dword [eax + 0x8574], ebx
mov eax, esi
mov dword [edi], 0x37
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x411370
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov eax, dword [esi + 0x190]
test eax, eax
je 0x411396
push dword [esi + 0x11c]
push dword [ebp + 0xc]
push dword [ebp + 8]
push edx
push esi
call eax
add esp, 0x14
pop esi
pop ebp
ret
cmp edx, 2
ja 0x4113ca
push dword [esi + 0x118]
lea eax, [edx*2 + 0x451380]
push 1
add eax, edx
push 2
push eax
call fcn.00432498
push dword [esi + 0x118]
push 1
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00432498
add esp, 0x20
xor eax, eax
pop esi
pop ebp
ret

Function at 0x415410
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov ecx, dword [ebp + 8]
call fcn.00403080
push eax
push edx
push esi
call fcn.0043ec20
add esp, 0xc
pop esi
pop ebp
ret
Function at 0x41b650
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
add edx, 0xfffffffd
mov eax, dword [edi + 0x10]
mov ebx, dword [eax]
cmp edx, 4
ja case.0x41b666.4
jmp dword [edx*4 + 0x41b88c]
lea ecx, [edi + 0x15c]
call fcn.0041af70
movzx ecx, word [edi + 0x40]
movzx esi, ax
lea eax, [ecx + 1]
and eax, 0xffff
cmp eax, esi
jne 0x41b694
mov dword [edi + 0x18], 0
jmp 0x41b6ab
cmp ecx, esi
jne 0x41b725
push esi
push str.Received_last_DATA_packet_block__d_again._n
push ebx
call fcn.00410c50
add esp, 0xc
mov edx, 4
mov word [edi + 0x40], si
lea ecx, [edi + 0x160]
call fcn.0041af20
mov dx, word [edi + 0x40]
lea ecx, [edi + 0x160]
call fcn.0041af40
push dword [edi + 0x148]
lea eax, [edi + 0xc8]
push eax
push 0
push 4
push dword [edi + 0x160]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x41b7fb
mov eax, dword [edi + 0x154]
xor ecx, ecx
add eax, 4
cmp dword [edi + 0x14c], eax
lea eax, [edi + 0x38]
push eax
setl cl
lea ecx, [ecx*2 + 1]
mov dword [edi], ecx
call fcn.004321c0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
ret
push eax
push esi
push str.Received_unexpected_DATA_packet_block__d__expecting_block__d_n
push ebx
call fcn.00410c50
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
ret
xor eax, eax
lea ecx, [edi + 0x160]
mov word [edi + 0x40], ax
mov dword [edi + 0x18], eax
lea edx, [eax + 4]
call fcn.0041af20
mov dx, word [edi + 0x40]
lea ecx, [edi + 0x160]
call fcn.0041af40
push dword [edi + 0x148]
lea eax, [edi + 0xc8]
push eax
push 0
push 4
push dword [edi + 0x160]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x41b7fb
lea eax, [edi + 0x38]
mov dword [edi], 1
push eax
call fcn.004321c0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
ret
movzx eax, word [edi + 0x40]
inc dword [edi + 0x18]
inc eax
push dword [edi + 0x18]
and eax, 0xffff
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebx
call fcn.00410c50
mov eax, dword [edi + 0x18]
add esp, 0x10
cmp eax, dword [edi + 0x20]
jle 0x41b7d7
mov dword [edi + 8], 0xffffff9d
xor eax, eax
mov dword [edi], 3
pop edi
pop esi
pop ebx
ret
push dword [edi + 0x148]
lea eax, [edi + 0xc8]
push eax
push 0
push 4
push dword [edi + 0x160]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x41b868
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [edi + 0x10]
mov edx, eax
call fcn.00429530
push eax
push 0x4524d4
push ebx
call fcn.00410cd0
mov eax, 0x37
add esp, 0xc
pop edi
pop esi
pop ebx
ret
mov edx, 5
lea ecx, [edi + 0x160]
call fcn.0041af20
mov dx, word [edi + 0x40]
lea ecx, [edi + 0x160]
call fcn.0041af40
push dword [edi + 0x148]
lea eax, [edi + 0xc8]
push eax
push 0
push 4
push dword [edi + 0x160]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [edi], 3
xor eax, eax
pop edi
pop esi
pop ebx
ret
push str.tftp_rx:_internal_error
push 0x4524d4
push ebx
call fcn.00410cd0
add esp, 0xc
mov eax, 0x47
pop edi
pop esi
pop ebx
ret
Function at 0x41bec0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x45a770]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov eax, ecx
mov dword [ebp - 8], 0x80
push edi
mov dword [ebp - 0x8c], eax
mov esi, dword [eax + 0x3a0]
mov edi, dword [eax]
lea ebx, [esi + 0x15c]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x88]
push eax
mov eax, dword [esi + 0x154]
push 0
add eax, 4
push eax
push dword [ebx]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x41bf46
push dword [ebp - 8]
lea eax, [ebp - 0x88]
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.00435d20
mov eax, dword [ebp - 8]
add esp, 0xc
mov dword [esi + 0x148], eax
mov edx, dword [esi + 0x14c]
cmp edx, 4
jge 0x41bf79
push str.Received_too_short_packet
push edi
call fcn.00410cd0
add esp, 8
mov dword [esi + 0xc], 7
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
mov ecx, ebx
call fcn.0041af60
movzx eax, ax
mov dword [esi + 0xc], eax
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x41bf92
jmp dword [eax*4 + 0x41c0ac]
cmp edx, 4
jle case.0x41bf92.4
mov ecx, ebx
call fcn.0041af70
movzx ecx, word [esi + 0x40]
inc ecx
cmp cx, ax
jne case.0x41bf92.4
mov ecx, dword [ebp - 0x8c]
lea eax, [edx - 4]
push eax
mov eax, dword [ebx]
mov edx, 1
add eax, 4
push eax
call fcn.004111b0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x41bff9
mov edx, 5
mov ecx, esi
call fcn.0041bc30
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x14c]
mov ecx, edi
sub eax, 4
cdq
add dword [edi + 0x70], eax
adc dword [edi + 0x74], edx
push dword [edi + 0x74]
push dword [edi + 0x70]
call fcn.00415970
add esp, 8
jmp case.0x41bf92.4
mov ecx, ebx
call fcn.0041af70
movzx eax, ax
mov dword [esi + 8], eax
mov eax, dword [ebx]
add eax, 4
push eax
push 0x452588
push edi
call fcn.00410c50
jmp 0x41c073
lea eax, [edx - 2]
mov ecx, esi
mov edx, dword [ebx]
push eax
add edx, 2
call fcn.0041b000
add esp, 4
test eax, eax
je case.0x41bf92.4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x4524d4
push edi
call fcn.00410cd0
add esp, 0xc
mov ecx, dword [ebp - 0x8c]
call fcn.00415a50
test eax, eax
je 0x41bf66
mov edx, 5
mov ecx, esi
call fcn.0041bc30
mov ecx, dword [ebp - 4]
mov eax, 0x2a
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
Function at 0x41f720
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x45a770]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov dword [ebp - 8], 0x10
push edi
lea ecx, [ebp - 8]
or edi, 0xffffffff
push ecx
mov eax, dword [esi + 0x158]
lea ecx, [ebp - 0x18]
mov ebx, dword [esi]
push ecx
push eax
mov dword [ebp - 0x1c], eax
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x41f777
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x10
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
mov edx, dword [ebp - 0x1c]
mov ecx, esi
call fcn.0040fbb0
cmp edi, 0xffffffff
jne 0x41f7aa
push str.Error_accept__ing_server_connect
push ebx
call fcn.00410cd0
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
push str.Connection_accepted_from_server_n
push ebx
call fcn.00410c50
add esp, 8
mov dword [esi + 0x158], edi
mov edx, 1
mov ecx, edi
call fcn.00428d50
mov byte [esi + 0x165], 1
mov eax, dword [ebx + 0x198]
test eax, eax
je 0x41f816
push 1
push edi
push dword [ebx + 0x19c]
call eax
add esp, 0xc
test eax, eax
je 0x41f816
mov edx, edi
mov ecx, esi
call fcn.0040fbb0
mov dword [esi + 0x158], 0xffffffff
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00430ba5
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00430ba5
mov esp, ebp
pop ebp
ret