joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10004b60
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x14]
push ebx
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [eax], ebx
lea eax, [ebp - 8]
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 - 0xc], eax
test eax, eax
jne 0x10004cdd
push edi
mov edi, dword [ebp - 8]
test edi, edi
je 0x10004cc9
push esi
lea esp, [esp]
cmp dword [edi + 4], 2
jne 0x10004c5a
cmp dword [edi + 0x18], 0
je 0x10004c5a
mov eax, dword [edi + 0x10]
test eax, eax
je 0x10004c5a
cmp eax, 0x10
jb 0x10004c5a
push 0x20
call dword [0x10070008]
mov esi, eax
add esp, 4
test esi, esi
je 0x10004cbe
mov eax, dword [edi]
mov dword [esi], eax
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 8]
mov dword [esi + 8], eax
mov eax, dword [edi + 0xc]
push 0x10
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], 0x10
mov dword [esi + 0x18], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x1c], 0
call dword [0x10070008]
add esp, 4
mov dword [esi + 0x18], eax
test eax, eax
je 0x10004cad
mov ecx, dword [edi + 0x18]
movdqu xmm0, xmmword [ecx]
movdqu xmmword [eax], xmm0
mov eax, dword [edi + 0x14]
test eax, eax
je 0x10004c48
push eax
call dword [0x10070014]
add esp, 4
mov dword [esi + 0x14], eax
test eax, eax
je 0x10004c93
mov eax, dword [ebp - 4]
test ebx, ebx
cmove ebx, esi
test eax, eax
je 0x10004c57
mov dword [eax + 0x1c], esi
mov dword [ebp - 4], esi
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x10004ba0
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
pop esi
test eax, eax
je 0x10004c77
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test edi, edi
je 0x10004cc5
push ebx
call fcn.10004b20
mov eax, dword [ebp + 0x14]
add esp, 4
xor ebx, ebx
mov dword [eax], ebx
mov eax, edi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [esi + 0x18]
mov edi, 8
call dword [0x1007000c]
push esi
call dword [0x1007000c]
add esp, 8
jmp 0x10004c68
push esi
mov edi, 8
call dword [0x1007000c]
add esp, 4
jmp 0x10004c68
mov edi, 8
jmp 0x10004c68
test ebx, ebx
jne 0x10004cd5
mov edi, 0x2af9
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp + 0x14]
mov dword [eax], ebx
mov eax, edi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10005b70
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push esi
push edi
mov byte [edi], 0
call dword [sym.imp.WS2_32.dll_gethostname]
mov byte [edi + esi - 1], 0
test eax, eax
jne 0x10005ba3
push 0x2e
push edi
call fcn.10039bf0
add esp, 8
test eax, eax
je 0x10005ba1
mov byte [eax], 0
xor eax, eax
pop edi
pop esi
pop ebp
ret
Function at 0x10009970
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x100701d0]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x100099c0
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x100099ba
shr eax, 8
cmp al, 2
jne 0x100099ba
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038afc
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 4]
mov eax, 2
xor ecx, ebp
call fcn.10038afc
mov esp, ebp
pop ebp
ret

Function at 0x1000bb70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi]
cmp dword [eax + 4], 2
jne 0x1000bb9c
mov ecx, dword [esi + 0xc]
test ecx, ecx
jne 0x1000bb8d
pop edi
xor eax, eax
pop esi
pop ebp
ret
push dword [eax + 8]
push dword [ebp + 0x10]
push 1
push dword [ebp + 0xc]
call ecx
jmp 0x1000bbd0
cmp dword [esi + 8], 0
jne 0x1000bbc0
push 0x100606a8
push dword [eax + 8]
call fcn.1003a2b3
add esp, 8
mov dword [esi + 8], eax
test eax, eax
jne 0x1000bbc0
pop edi
or eax, 0xffffffff
pop esi
pop ebp
ret
push dword [esi + 8]
push dword [ebp + 0x10]
push 1
push dword [ebp + 0xc]
call fcn.1003c657
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x1000bbf2
mov eax, dword [esi + 8]
test eax, eax
je 0x1000bbec
push eax
call fcn.1003a039
add esp, 4
mov dword [esi + 8], edi
mov eax, dword [esi]
mov eax, dword [eax]
mov dword [esi], eax
mov eax, edi
pop edi
pop esi
pop ebp
ret
Function at 0x1000c760
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x100701d0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x18]
push edi
push ecx
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x18], 0x10
mov eax, dword [esi + 0x158]
or edi, 0xffffffff
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 0x1000c7b8
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x10
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
push dword [ebp - 0x1c]
push esi
call fcn.10001f90
add esp, 8
cmp edi, 0xffffffff
jne 0x1000c7ed
push str.Error_accept__ing_server_connect
push ebx
call fcn.100246b0
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038afc
mov esp, ebp
pop ebp
ret
push str.Connection_accepted_from_server_n
push ebx
call fcn.10024750
push 1
mov byte [esi + 0x1e8], 0
push edi
mov dword [esi + 0x158], edi
call fcn.1001f710
mov byte [esi + 0x165], 1
add esp, 0x10
mov eax, dword [ebx + 0x198]
test eax, eax
je 0x1000c85d
push 1
push edi
push dword [ebx + 0x19c]
call eax
add esp, 0xc
test eax, eax
je 0x1000c85d
push edi
push esi
call fcn.10001f90
add esp, 8
mov dword [esi + 0x158], 0xffffffff
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038afc
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.10038afc
mov esp, ebp
pop ebp
ret

Function at 0x1000eca0
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
mov eax, 0x51eb851f
imul ecx
push ebx
sar edx, 5
push esi
mov eax, edx
xor esi, esi
push edi
mov edi, dword [ebp + 8]
shr eax, 0x1f
add eax, edx
mov ebx, dword [edi]
cmp eax, 2
je 0x1000ecdc
push str.Couldnt_set_desired_mode
push ebx
call fcn.100246b0
add esp, 8
lea eax, [esi + 0x11]
pop edi
pop esi
pop ebx
pop ebp
ret
cmp ecx, 0xc8
je 0x1000ecf3
push ecx
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
push ebx
call fcn.10024750
add esp, 0xc
mov eax, dword [ebp + 0x10]
cmp eax, 0x13
jne 0x1000ed0b
push edi
call fcn.1000ea40
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebx
pop ebp
ret
cmp eax, 0x14
jne 0x1000ed20
push edi
call fcn.1000dbb0
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebx
pop ebp
ret
cmp eax, 0x15
jne 0x1000ed35
push edi
call fcn.1000ea20
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebx
pop ebp
ret
cmp eax, 0x16
jne 0x1000ed45
push edi
call fcn.1000eb80
mov esi, eax
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret
Function at 0x10011760
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x100701d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push eax
call fcn.1003cb56
add esp, 4
mov byte [ebp - 0x108], 0
test eax, eax
je 0x100117c4
push 0x104
lea ecx, [ebp - 0x108]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [ebp - 0x108], 0
je 0x100117c4
lea eax, [ebp - 0x108]
push eax
call dword [0x10070014]
add esp, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038afc
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
call fcn.10038afc
mov esp, ebp
pop ebp
ret

Function at 0x100117e0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.10011760

Function at 0x10012da0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x10012dbe
cmp dword [esi + 0x48], 0
je 0x10012dbe
push 2
push 3
push esi
call fcn.10024c90
add esp, 0xc
push dword [ebp + 0xc]
call fcn.10012220
add esp, 4
test esi, esi
je 0x10012dde
cmp dword [esi + 0x48], 0
je 0x10012dde
push 3
push esi
call fcn.10024cd0
add esp, 8
pop esi
pop ebp
ret
Function at 0x10022d80
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov cl, byte [ebp + 8]
movsx eax, cl
add eax, 0xffffff9f
cmp eax, 0x19
ja case.default.0x10022d91
jmp dword [eax*4 + 0x10022e04]
mov al, 0x41
pop ebp
ret
mov al, 0x42
pop ebp
ret
mov al, 0x43
pop ebp
ret
mov al, 0x44
pop ebp
ret
mov al, 0x45
pop ebp
ret
mov al, 0x46
pop ebp
ret
mov al, 0x47
pop ebp
ret
mov al, 0x48
pop ebp
ret
mov al, 0x49
pop ebp
ret
mov al, 0x4a
pop ebp
ret
mov al, 0x4b
pop ebp
ret
mov al, 0x4c
pop ebp
ret
mov al, 0x4d
pop ebp
ret
mov al, 0x4e
pop ebp
ret
mov al, 0x4f
pop ebp
ret
mov al, 0x50
pop ebp
ret
mov al, 0x51
pop ebp
ret
mov al, 0x52
pop ebp
ret
mov al, 0x53
pop ebp
ret
mov al, 0x54
pop ebp
ret
mov al, 0x55
pop ebp
ret
mov al, 0x56
pop ebp
ret
mov al, 0x57
pop ebp
ret
mov al, 0x58
pop ebp
ret
mov al, 0x59
pop ebp
ret
mov al, 0x5a
pop ebp
ret
mov al, cl
pop ebp
ret
Function at 0x100249c0
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 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 ebx, dword [ebp + 0x18]
mov edi, eax
mov dword [ebx], 0
cmp edi, 0xffffffff
jne 0x10024a3e
push esi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x10024a0e
pop esi
pop edi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
pop ebp
ret
push esi
push dword [ebp + 8]
call fcn.10028a80
push eax
mov eax, dword [ebp + 8]
push str.Send_failure:__s
push dword [eax]
call fcn.100246b0
mov eax, dword [ebp + 8]
add esp, 0x14
mov eax, dword [eax]
mov dword [eax + 0x8574], esi
mov eax, edi
mov dword [ebx], 0x37
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x10024c20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x190]
test eax, eax
je 0x10024c49
push dword [esi + 0x11c]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call eax
add esp, 0x14
pop esi
pop ebp
ret
mov eax, dword [ebp + 0xc]
cmp eax, 2
ja 0x10024c7f
push dword [esi + 0x118]
lea eax, [eax + eax*2]
push 1
add eax, 0x10063c84
push 2
push eax
call fcn.1003de8b
push dword [esi + 0x118]
push 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.1003de8b
add esp, 0x20
xor eax, eax
pop esi
pop ebp
ret

Function at 0x10029c10
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x100701d0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x194]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x10029c5d
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.100246b0
add esp, 0xc
mov eax, 2
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038afc
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x10029c85
shr eax, 8
test al, al
jne 0x10029c85
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038afc
mov esp, ebp
pop ebp
ret
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.100246b0
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 2
pop esi
call fcn.10038afc
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
push 0
mov byte [ebp + 0xa], al
lea eax, [ebp + 8]
mov edi, dword [esi]
push 3
push eax
push dword [esi + 0x154]
mov byte [ebp + 8], 0xff
mov byte [ebp + 9], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1002a4f8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.100246b0
add esp, 0xc
push dword [ebp + 0x10]
push ebx
push str.SENT
push dword [esi]
call fcn.10029da0
add esp, 0x10
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x1002a5d0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 0xc], 0x1f
mov eax, dword [ebp + 8]
push ebx
mov eax, dword [eax]
mov dword [ebp - 4], eax
mov ebx, dword [eax + 0x114]
jne 0x1002a71c
push edi
lea eax, [ebx + 0x1cb0]
lea edi, [ebx + 0x1eb0]
mov dword [edi], eax
cmp eax, edi
jae 0x1002a605
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a610
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a61b
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
movzx eax, ax
mov dword [ebp + 0xc], eax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov ecx, dword [ebp + 0xc]
movzx edx, ax
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a64c
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a656
mov byte [eax], ch
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a660
mov byte [eax], dl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a66a
mov byte [eax], dh
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a675
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x1002a680
mov byte [eax], 0xf0
inc dword [edi]
mov eax, dword [edi]
lea esi, [ebx + 0x1cb0]
mov dword [ebx + 0x1eb4], eax
sub eax, esi
sub eax, 2
mov dword [edi], esi
mov edi, dword [ebp - 4]
push eax
lea eax, [ebx + 0x1cb2]
push eax
push 0x3e
push edi
call fcn.10029eb0
add esp, 0x10
push 0
push 3
push esi
mov esi, dword [ebp + 8]
push dword [esi + 0x154]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1002a6d8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.100246b0
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb3]
push eax
push esi
call fcn.1002a510
add esp, 0xc
lea eax, [ebx + 0x1cb7]
push 0
push 2
push eax
push dword [esi + 0x154]
call dword [sym.imp.WS2_32.dll_send]
pop esi
test eax, eax
jns 0x1002a71b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.100246b0
add esp, 0xc
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1002b740
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x100701d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, dword [eax + 0x3c0]
mov edi, dword [eax]
lea ebx, [esi + 0x15c]
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x88]
push eax
mov dword [ebp - 0x88], 0x80
lea eax, [ebp - 0x84]
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 0x1002b7d3
push dword [ebp - 0x88]
lea eax, [ebp - 0x84]
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.10038f50
mov eax, dword [ebp - 0x88]
add esp, 0xc
mov dword [esi + 0x148], eax
mov edx, dword [esi + 0x14c]
cmp edx, 4
jge 0x1002b806
push str.Received_too_short_packet
push edi
call fcn.100246b0
add esp, 8
mov dword [esi + 0xc], 7
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038afc
mov esp, ebp
pop ebp
ret
push ebx
call fcn.1002b340
movzx eax, ax
add esp, 4
mov dword [esi + 0xc], eax
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x1002b821
jmp dword [eax*4 + 0x1002b938]
cmp edx, 4
jle case.0x1002b821.4
push ebx
call fcn.1002b320
movzx ecx, word [esi + 0x40]
add esp, 4
inc ecx
cmp cx, ax
jne case.0x1002b821.4
lea eax, [edx - 4]
push eax
mov eax, dword [ebx]
add eax, 4
push eax
push 1
push dword [ebp - 0x8c]
call fcn.100245a0
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x1002b886
push 5
push esi
call fcn.1002c050
add esp, 8
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038afc
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [edi + 0x70], eax
adc dword [edi + 0x74], edx
push dword [edi + 0x74]
push dword [edi + 0x70]
push edi
call fcn.10021ec0
jmp 0x1002b8fe
push ebx
call fcn.1002b320
movzx eax, ax
mov dword [esi + 8], eax
mov eax, dword [ebx]
add eax, 4
push eax
push 0x1005fb64
push edi
call fcn.10024750
add esp, 0x10
jmp case.0x1002b821.4
lea eax, [edx - 2]
push eax
mov eax, dword [ebx]
add eax, 2
push eax
push esi
call fcn.1002b4f0
add esp, 0xc
test eax, eax
je case.0x1002b821.4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038afc
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x10060a7c
push edi
call fcn.100246b0
add esp, 0xc
push dword [ebp - 0x8c]
call fcn.10022120
add esp, 4
test eax, eax
je 0x1002b7f3
push 5
push esi
call fcn.1002c050
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 0x2a
pop edi
pop esi
pop ebx
call fcn.10038afc
mov esp, ebp
pop ebp
ret
Function at 0x1002c050
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x10]
mov edx, dword [ecx]
mov eax, dword [eax]
cmp edx, 3
ja case.default.0x1002c062
jmp dword [edx*4 + 0x1002c0b8]
mov dword [ebp + 8], ecx
pop ebp
jmp fcn.1002bba0
mov dword [ebp + 8], ecx
pop ebp
jmp fcn.1002b950
mov dword [ebp + 8], ecx
pop ebp
jmp fcn.1002c260
push str.TFTP_finished
push 0x1005fb64
push eax
call fcn.10024750
add esp, 0xc
xor eax, eax
pop ebp
ret
push str.Internal_state_machine_error
push 0x10060a7c
push eax
call fcn.100246b0
add esp, 0xc
mov eax, 0x47
pop ebp
ret

Function at 0x10034580
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0x10]
call fcn.10034680
add esp, 4
mov dword [ebp + 0x10], eax
pop ebp
jmp fcn.10046816
Function at 0x407214
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00409f48
test esi, esi
jne 0x40724a
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.0040a0d0
jmp 0x407268
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00407158
mov edi, eax
test esi, esi
je 0x407268
cmp dword [ebx], 0
je 0x407268
dec esi
jmp 0x407251
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x408adc
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff0
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call fcn.00408f9c
mov byte [esp], al
cmp byte [esp], 0
jne 0x408c65
test edi, edi
je 0x408c65
mov byte [esp + 1], 0
test ebp, ebp
jle 0x408ba5
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
xor eax, eax
mov dword [esp + 0xc], eax
test ebp, ebp
jle 0x408b80
cmp edi, 0xffffffff
je 0x408b41
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x408b41
mov byte [esp], 0
jmp 0x408c65
cmp dword [esi], 1
jg 0x408b80
cmp dword [esi], 0
jne 0x408b72
xor eax, eax
mov edx, 1
lock cmpxchg dword [esi], edx
test eax, eax
jne 0x408b72
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x408c65
lea eax, [esp + 0xc]
call fcn.00408798
dec ebp
test ebp, ebp
jg 0x408b26
cmp edi, 0xffffffff
je 0x408ba5
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x408ba3
mov byte [esp], 0
jmp 0x408c65
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x408aea
lea edx, [ebx + 2]
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x408ba5
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.00408ce0
mov edx, eax
mov ebx, dword [0x6a48fc]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x408c09
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x408c07
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x408c09
xor edi, edi
cmp byte [esp], 0
je 0x408c2f
mov ebx, dword [esi]
test bl, 1
jne 0x408c45
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x408c0f
mov byte [esp + 1], 1
jmp 0x408c45
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x408c2f
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x408bbc
cmp byte [esp], 0
je 0x408c65
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4098f0
Capabilities:
Terminate process

Disassembly:
push ecx
push ebx
push esi
push edi
mov ebx, 0x6a6b9c
cmp dword [ebp + 0xc], 2
jl 0x409904
mov ebx, 0x6a6bcc
mov esi, ebx
lea edi, [ebp - 0x40]
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
pop dword [ebx + 0x20]
pop dword [ebx + 0x1c]
pop dword [ebx + 0x18]
mov dword [ebx + 0x14], ebp
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], edx
lea ecx, [ebp - 0x40]
mov dword [ebx], ecx
call sub.kernel32.dll_GetCurrentThreadId
mov dword [ebx + 0x2c], eax
mov eax, dword [ebx + 8]
xor ecx, ecx
cmp dword [ebp + 0xc], 0
jne 0x40993c
mov ecx, dword [eax]
mov dword [ebx + 0xc], ecx
mov eax, 0x405150
mov dword [0x6a401c], eax
mov eax, 0x405158
mov dword [0x6a4020], eax
mov eax, ebx
call fcn.004097d4
mov eax, dword [ebp + 0xc]
inc eax
mov byte [ebx + 0x28], al
dec eax
pop ecx
mov edx, dword [ecx]
mov dword [ebx + 0x24], edx
je 0x409971
cmp al, 3
jge 0x409971
call dword [ecx + eax*4]
push ecx
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x409982
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
call ecx
pop ecx
mov eax, dword [ebp + 0xc]
cmp al, 3
jl 0x40998d
call dword [ecx + eax*4]
cmp dword [0x6a4040], 0
jne 0x4099a3
mov byte [0x6a4048], 1
fnstcw word [0x693028]
mov eax, dword [ebp + 0xc]
dec eax
jne fcn.00409c3c
call fcn.00409884
ret 4

Function at 0x409ba4
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x6a405c], 0
je 0x409c0b
cmp word [0x6a4348], 0xd7b2
jne 0x409bcd
cmp dword [0x6a4350], 0
jbe 0x409bcd
mov eax, 0x6a4344
call dword [0x6a4360]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
mov eax, 0x409c38
call fcn.0040a7fc
push eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x693034], 0
jne 0x409c27
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x409e08
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 0x10]
cmp dword [0x693038], 0
je 0x409e33
mov edx, edi
mov eax, esi
call dword [0x693038]
mov ebx, eax
jmp 0x409e44
mov eax, 8
call fcn.00406e90
mov ebx, eax
mov dword [ebx], esi
mov dword [ebx + 4], edi
mov byte [0x6a405d], 1
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
push ebx
mov eax, 0x409dd0
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CreateThread
mov esi, eax
test esi, esi
jne 0x409e74
mov eax, ebx
call fcn.00406eac
mov eax, esi
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 0xc