joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4068c6
Capabilities:
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0x74]
sub esp, 0x9c
mov eax, dword [0x42a43c]
xor eax, ebp
mov dword [ebp + 0x70], eax
mov eax, dword [ebp + 0x7c]
or dword [ebp - 0x14], 0xffffffff
push esi
push edi
lea ecx, [ebp - 0x24]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
push dword [ebp - 0x18]
lea eax, [ebp - 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push str._d__d__d__d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push eax
xor edi, edi
push edi
push 0x20006
push edi
push edi
push edi
push str.SOFTWARETFTPD32
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, eax
neg esi
lea eax, [ebp - 0x10]
sbb esi, esi
push eax
inc esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x10]
push eax
push 1
push edi
push str.LastWindowPos
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
neg eax
sbb eax, eax
inc eax
and esi, eax
cmp dword [ebp - 0x14], 0xffffffff
je 0x40696e
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 0x70]
pop edi
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0040e1f0
add ebp, 0x74
leave
ret
Function at 0x406981
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x74]
sub esp, 0xa8
mov eax, dword [0x42a43c]
xor eax, ebp
mov dword [ebp + 0x70], eax
mov eax, dword [ebp + 0x7c]
or dword [ebp - 0x18], 0xffffffff
push esi
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x18]
push eax
push 0x20019
xor esi, esi
push esi
push str.SOFTWARETFTPD32
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x14], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push esi
push str.LastWindowPos
push dword [ebp - 0x18]
mov dword [ebp - 0x20], 0x80
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp dword [ebp - 0x18], 0xffffffff
je 0x4069f1
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp - 0x10], 0
lea ecx, [ebp - 0x10]
mov byte [ebp + 0x6f], 0
mov esi, ecx
je 0x406ab0
push ebx
mov ebx, dword [ebp - 0x28]
push edi
mov edi, dword [ebp - 0x2c]
cmp byte [esi], 0x20
jne 0x406a54
mov eax, dword [ebp - 0x14]
inc dword [ebp - 0x14]
sub eax, 0
mov byte [esi], 0
je 0x406a47
dec eax
je 0x406a3c
dec eax
je 0x406a32
dec eax
jne 0x406a51
push ecx
call fcn.0040f11b
mov ebx, eax
jmp 0x406a50
push ecx
call fcn.0040f11b
mov edi, eax
jmp 0x406a50
push ecx
call fcn.0040f11b
mov dword [ebp - 0x30], eax
jmp 0x406a50
push ecx
call fcn.0040f11b
mov dword [ebp - 0x34], eax
pop ecx
lea ecx, [esi + 1]
inc esi
cmp byte [esi], 0
jne 0x406a0c
cmp dword [ebp - 0x14], 4
jne 0x406aae
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0
call esi
mov ecx, dword [ebp - 0x34]
add ecx, 0x96
cmp ecx, eax
jge 0x406aae
push 1
call esi
mov ecx, dword [ebp - 0x30]
lea edx, [ecx + 0x96]
cmp edx, eax
jge 0x406aae
mov eax, dword [ebp - 0x34]
cmp eax, edi
jge 0x406aae
cmp ecx, ebx
jge 0x406aae
test eax, eax
jl 0x406aae
test ecx, ecx
jl 0x406aae
push 1
sub ebx, ecx
push ebx
sub edi, eax
push edi
push ecx
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.USER32.dll_MoveWindow]
pop edi
pop ebx
mov ecx, dword [ebp + 0x70]
mov eax, dword [ebp - 0x24]
xor ecx, ebp
pop esi
call fcn.0040e1f0
add ebp, 0x74
leave
ret

Function at 0x406c07
Capabilities:
Create process on windows

Disassembly:
push ebp
lea ebp, [esp - 0xec]
sub esp, 0x16c
mov eax, dword [0x42a43c]
xor eax, ebp
mov dword [ebp + 0xe8], eax
push esi
push edi
push str.explorer.exe
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x1f]
push 0x104
push eax
call fcn.00404a21
push 0x44
pop edi
push edi
xor esi, esi
lea eax, [ebp - 0x80]
push esi
push eax
call fcn.0040ed00
add esp, 0x14
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x80]
push eax
push esi
push esi
push 0x20
push esi
push esi
push esi
lea eax, [ebp - 0x2c]
push eax
push esi
mov dword [ebp - 0x80], edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push dword [ebp - 0x3c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, eax
call esi
push dword [ebp - 0x38]
call esi
mov ecx, dword [ebp + 0xe8]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.0040e1f0
add ebp, 0xec
leave
ret
Function at 0x40725a
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
lea ebp, [esp - 0xf8]
sub esp, 0x178
mov eax, dword [0x42a43c]
xor eax, ebp
mov dword [ebp + 0xf4], eax
push ebx
push esi
push edi
mov ebx, 0xf4
push ebx
lea eax, [ebp - 0x80]
push 0
push eax
call fcn.0040ed00
add esp, 0xc
push 0x80
lea eax, [ebp + 0x74]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x4072cf
lea eax, [ebp + 0x74]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x4072cf
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4072cf
xor ecx, ecx
cmp dword [eax], 0
je 0x4072cc
mov edx, dword [eax]
mov edx, dword [edx]
mov dword [ebp + ecx*8 - 0x7c], edx
inc ecx
add eax, 4
cmp ecx, 0x1e
jl 0x4072b6
mov dword [ebp - 0x80], ecx
push 0x3d
mov eax, 0x4321e8
pop ecx
mov edi, eax
lea esi, [ebp - 0x80]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
je 0x4072fa
push 0x3d
pop ecx
push edx
push edx
push ebx
push eax
mov edi, eax
lea esi, [ebp - 0x80]
push 0x6d
rep movsd dword es:[edi], dword [esi]
call fcn.0040b698
add esp, 0x14
mov ecx, dword [ebp + 0xf4]
pop edi
xor eax, eax
pop esi
xor ecx, ebp
inc eax
pop ebx
call fcn.0040e1f0
add ebp, 0xf8
leave
ret

Function at 0x4073d1
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x42a43c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x100
lea eax, [ebp - 0x104]
push eax
call sub.WS2_32.dll_gethostname
cmp eax, 0xffffffff
je 0x40744a
lea eax, [ebp - 0x104]
push eax
call sub.WS2_32.dll_gethostbyname
mov dword [ebp - 0x108], eax
test eax, eax
je 0x40744a
mov esi, dword [eax + 0xc]
test esi, esi
je 0x40744a
xor edi, edi
cmp dword [esi], edi
je 0x40743e
mov eax, esi
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [eax]
call fcn.004073b3
add esp, 0xc
test eax, eax
jne 0x40743e
inc edi
lea eax, [esi + edi*4]
cmp dword [eax], 0
jne 0x407421
lea eax, [esi + edi*4]
cmp dword [eax], 0
je 0x407450
mov eax, dword [eax]
jmp 0x40746e
mov edi, dword [ebp - 0x108]
cmp dword [ebp + 0x10], 0
je 0x40745a
xor eax, eax
jmp 0x40746e
test edi, edi
jle 0x407469
mov eax, dword [ebp - 0x108]
mov eax, dword [eax + 0xc]
jmp 0x407446
mov eax, 0x429ad8
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0040e1f0
leave
ret
Function at 0x4075d2
Capabilities:
Create thread
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x42a43c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
push esi
push str._uninstall
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x407608
call fcn.00407aea
jmp 0x40767e
lea eax, [ebp - 0x194]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x407646
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x276c
mov eax, str.Error:_Tftpd32_now_requires_winsock_version_2
je 0x407632
mov eax, str.Error:_Cant_init_Winsocket
push 0x10
push 0x422f98
push eax
push 0
call fcn.0040bf40
add esp, 0x10
jmp 0x40767e
push 0
push 0
push 0x407837
call fcn.0040eb76
add esp, 0xc
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp + 0x14]
push esi
push ebx
push edi
call fcn.004058e9
add esp, 0x10
call dword [sym.imp.WS2_32.dll_WSACleanup]
push str.Thats_all_folks_n
call fcn.0040c685
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0040e1f0
leave
ret 0x10

Function at 0x4079ab
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x42a43c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor esi, esi
push 0x43f760
push dword [esi + 0x429fa8]
push dword [esi + 0x429fac]
push dword [esi + 0x429fa4]
push dword [esi + 0x429fa0]
push str.SOFTWARETFTPD32
call fcn.0040c01a
add esi, 0x10
add esp, 0x18
cmp esi, 0x1f0
jb 0x4079c1
cmp dword [0x429c34], 0
jne 0x407a09
mov dword [0x429c34], 0xf
mov esi, 0x104
push esi
lea eax, [ebp - 0x108]
push eax
push str.TFTP_DIR
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x407a4d
lea eax, [ebp - 0x108]
push eax
call fcn.0040c8e4
pop ecx
test eax, eax
je 0x407a4d
push 0
push 0x429e90
push esi
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x407a7c
push edi
mov edi, 0x429ae0
push edi
call fcn.0040c8e4
pop ecx
test eax, eax
je 0x407a6f
push 0
push 0x429e90
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x407a7b
push 0x429e90
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
pop edi
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
inc eax
pop esi
call fcn.0040e1f0
leave
ret
Function at 0x407f1b
Capabilities:
Create udp socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x42a43c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0
push dword [ebp + 8]
mov esi, ecx
push 2
mov edi, edx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x18], eax
push 2
pop eax
cmp dword [ebp + 8], eax
mov word [ebp - 0x14], ax
mov eax, 0x422d00
je 0x407f57
mov eax, 0x4242e8
push eax
push esi
call dword [sym.imp.WS2_32.dll_getservbyname]
test eax, eax
je 0x407f69
mov ax, word [eax + 8]
jmp 0x407f72
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_htons]
cmp byte [edi], 0
mov word [ebp - 0x12], ax
jne 0x407f80
mov edi, 0x42434c
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x10
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
push 0
push 8
push str.wake_up
push dword [ebp - 0x18]
call dword [sym.imp.WS2_32.dll_sendto]
push dword [ebp - 0x18]
mov esi, eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
xor eax, eax
test esi, esi
setg al
pop edi
xor ecx, ebp
pop esi
call fcn.0040e1f0
leave
ret

Function at 0x40802c
Capabilities:
Create thread

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
mov esi, ebp
imul esi, esi, 0x2c
mov eax, dword [esi + 0x424084]
push edi
mov edi, ebp
xor ebx, ebx
shl edi, 4
cmp eax, 1
jl 0x408089
push dword [esi + 0x424094]
mov ecx, dword [esi + 0x42408c]
push dword [esi + 0x424090]
mov dword [edi + 0x440c40], ebx
push dword [ecx]
mov ecx, dword [esi + 0x424088]
push eax
push dword [esi + 0x424070]
call fcn.00407d0d
add esp, 0x14
mov dword [edi + 0x440c4c], eax
cmp eax, 0xffffffff
jne 0x408090
xor eax, eax
jmp 0x4080eb
or dword [edi + 0x440c4c], 0xffffffff
cmp dword [esi + 0x424098], ebx
je 0x4080bb
push ebx
push ebx
push dword [esi + 0x42407c]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [edi + 0x440c48], eax
cmp eax, 0xffffffff
jne 0x4080c2
mov eax, ebp
call fcn.00407ee1
jmp 0x408085
or dword [edi + 0x440c48], 0xffffffff
push ebx
push dword [esi + 0x424080]
push dword [esi + 0x424078]
call fcn.0040eb76
add esp, 0xc
mov dword [edi + 0x440c44], eax
cmp eax, 0xffffffff
je 0x4080b2
xor eax, eax
inc eax
mov dword [edi + 0x440c40], eax
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x408443
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ecx
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x40847b
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40847b
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [ebp - 4]
push eax
call fcn.0040e710
add esp, 0xc
mov eax, dword [ebp - 4]
leave
ret
Function at 0x40856f
Capabilities:
Delete file
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x204
mov eax, dword [0x42a43c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [sym.imp.WS2_32.dll_htons]
push 5
call esi
push 0
mov word [0x432641], ax
call esi
push 0
push 4
push 0x432641
push dword [0x43a668]
mov word [0x432643], ax
call dword [sym.imp.WS2_32.dll_send]
call fcn.00408480
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.USER32.dll_wvsprintfA]
push 0x10
push 0x422f98
lea eax, [ebp - 0x204]
push eax
push dword [0x43232c]
call fcn.0040bf40
add esp, 0x10
push 0
push 1
push dword [0x432338]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
cmp byte [0x432340], 1
pop esi
jne 0x408615
cmp dword [0x43a664], 0
je 0x408615
push 0x432341
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.0040e1f0
leave
ret
Function at 0x4089eb
Capabilities:
Connect socket
Send data
Send data on socket

Disassembly:
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_htons]
push ebp
push esi
push edi
mov ebp, 0x436647
mov edi, 0x200
cmp byte [ebp], 0
je 0x408b2f
mov eax, ebp
mov ecx, 0x436645
sub eax, ecx
mov esi, ebp
add eax, 0xfffffffe
jmp 0x408a20
cmp byte [esi], 0
je 0x408a24
inc esi
inc eax
cmp eax, edi
jl 0x408a19
inc esi
mov eax, esi
sub eax, ecx
dec eax
dec eax
cmp eax, edi
je 0x408b37
cmp byte [0x432340], 1
jne 0x408a9a
push str.tsize
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x408a9a
push esi
call fcn.0040f11b
pop ecx
push 4
mov dword [0x43a690], eax
call ebx
push 0
mov word [0x432641], ax
call ebx
push 0
push dword [0x43a67c]
mov word [0x432643], ax
push 0x659
push dword [0x43232c]
call dword [sym.imp.USER32.dll_SetTimer]
push 0
push 4
push 0x432641
push dword [0x43a668]
call dword [sym.imp.WS2_32.dll_send]
push str.blksize
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x408ab6
push esi
call fcn.0040f11b
pop ecx
mov dword [0x43a69c], eax
push str.udpport
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x408b13
push esi
call fcn.0040f11b
push eax
push str.Port_value_is__d
call fcn.0040c685
push esi
call fcn.0040f11b
add esp, 0x10
push eax
call ebx
push 0x10
push 0x43a64c
push dword [0x43a668]
mov word [0x43a64e], ax
call dword [sym.imp.WS2_32.dll_connect]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebp
push str.re_connect_returns__d___d_
call fcn.0040c685
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebp, [eax + esi + 1]
mov eax, ebp
sub eax, 0x436645
dec eax
dec eax
cmp eax, edi
jl 0x4089ff
xor eax, eax
inc eax
pop edi
pop esi
pop ebp
pop ebx
ret
xor eax, eax
jmp 0x408b32

Function at 0x408b3b
Capabilities:
Connect socket
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
xor edi, edi
mov dword [0x43a664], edi
mov dword [ebp - 8], 0x10
mov esi, 0x43a64c
cmp dword [0x43a66c], edi
jne 0x408b7c
lea eax, [ebp - 8]
push eax
push esi
push edi
push 0x4004
push 0x436645
push dword [0x43a668]
call dword [sym.imp.WS2_32.dll_recvfrom]
jmp 0x408b93
push edi
push 0x4004
push 0x436645
push dword [0x43a668]
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x408b9f
xor eax, eax
jmp 0x408bcb
cmp dword [0x43a66c], edi
jne 0x408bc0
push 0x10
push esi
push dword [0x43a668]
call dword [sym.imp.WS2_32.dll_connect]
mov dword [0x43a66c], 1
mov eax, dword [ebp - 4]
mov dword [0x43a664], eax
xor eax, eax
inc eax
pop edi
pop esi
leave
ret
Function at 0x408bcf
Capabilities:
Get file size

Disassembly:
movzx eax, byte [0x432340]
dec eax
push ebx
push ebp
push esi
push edi
je 0x408c43
dec eax
jne 0x408c32
xor edi, edi
push edi
push 0x8000020
push 3
push edi
push 1
push bind
mov esi, 0x432341
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x43a670], eax
cmp eax, 0xffffffff
jne 0x408c25
call fcn.0040c61e
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Error_opening_file__s_for_reading_nreturn_code_is__d___s_
call fcn.0040856f
add esp, 0x10
jmp 0x408c3e
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x43a690], eax
xor eax, eax
cmp dword [0x43a670], 0xffffffff
setne al
pop edi
pop esi
pop ebp
pop ebx
ret
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
xor eax, eax
push eax
mov ebp, 0x8000020
push ebp
push 1
push eax
push eax
mov ebx, 0x40000000
push ebx
mov esi, 0x432341
push esi
call edi
mov dword [0x43a670], eax
cmp eax, 0xffffffff
jne 0x408c32
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
jne 0x408c32
push 3
push 0x422f98
push str.File_exists__overwrite_it__
push dword [0x43232c]
call fcn.0040bf40
add esp, 0x10
cmp eax, 6
jne 0x408c32
xor eax, eax
push eax
push ebp
push 2
push eax
push eax
push ebx
push esi
call edi
mov dword [0x43a670], eax
cmp eax, 0xffffffff
jne 0x408c32
call fcn.0040c61e
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Error_opening_file__s_for_writing_nreturn_code_is__d___s_
jmp 0x408c1b
Function at 0x40a095
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
mov ebx, dword [esp + 8]
cmp dword [ebx + 0x20], 0xffffffff
jne 0x40a0a4
xor eax, eax
pop ebx
ret
push esi
push edi
mov edi, dword [sym.imp.WS2_32.dll_htons]
push 5
lea esi, [ebx + 0x60]
call edi
push dword [esp + 0x14]
mov word [esi], ax
call edi
mov word [esi + 2], ax
xor eax, eax
cmp dword [0x42a250], eax
mov edi, 0x42a250
jl 0x40a0e2
mov ecx, dword [edi]
cmp ecx, dword [esp + 0x14]
je 0x40a0de
add edi, 8
cmp dword [edi], eax
jge 0x40a0cf
cmp dword [edi], eax
jge 0x40a0f9
mov eax, dword [esp + 0x14]
add eax, 0xffffff9c
push eax
call fcn.00410c9a
mov dword [edi + 4], eax
xor eax, eax
pop ecx
mov word [esi + 2], ax
push dword [edi + 4]
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
mov byte [edi + esi + 4], 0
push 0
add edi, 5
push edi
push esi
push dword [ebx + 0x20]
call dword [sym.imp.WS2_32.dll_send]
sub eax, edi
pop edi
neg eax
pop esi
sbb eax, eax
pop ebx
ret

Function at 0x40a1be
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1b4]
sub esp, 0x234
mov eax, dword [0x42a43c]
xor eax, ebp
mov dword [ebp + 0x1b0], eax
push ebx
push esi
mov esi, ecx
push edi
lea eax, [esi + 0x44a4]
push eax
lea edi, [esi + 0x44fc]
push edi
call fcn.0040de84
add esi, 0x427a
push esi
lea esi, [ebp - 0x7c]
call fcn.0040a18b
add esp, 0xc
push str..md5
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
xor esi, esi
push esi
push 0x8000020
push 2
push esi
push 1
push 0x40000000
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp - 0x80], esi
mov eax, dword [ebp - 0x80]
movzx ecx, byte [edi + eax]
push ecx
lea eax, [ebp + eax*2 + 0x18c]
push str._02x
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
inc dword [ebp - 0x80]
cmp dword [ebp - 0x80], 0x10
jl 0x40a232
push esi
lea eax, [ebp - 0x80]
push eax
push 0x20
lea eax, [ebp + 0x18c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x7c]
push eax
push str.MD5_written_into___s_
push 2
call fcn.004010eb
mov ecx, dword [ebp + 0x1b0]
add esp, 0xc
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0040e1f0
add ebp, 0x1b4
leave
ret
Function at 0x40a32c
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x42a43c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov esi, dword [ebp + 8]
push 2
pop eax
mov word [ebp - 0x14], ax
xor eax, eax
mov word [ebp - 0x12], ax
mov byte [ebp - 0x10], al
lea edi, [ebp - 0xf]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
movzx eax, word [0x429e5c]
push eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x429e4c
mov word [ebp - 0x12], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x10], eax
push 0x10
lea eax, [ebp - 0x14]
push eax
mov eax, dword [esi + 0x38]
push 0
add eax, 4
push eax
lea eax, [esi + 0x60]
push eax
push dword [esi + 0x20]
call dword [sym.imp.WS2_32.dll_sendto]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0040e1f0
leave
ret

Function at 0x40a3d7
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push esi
mov esi, eax
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x108], eax
mov eax, dword [esi + 0x3c]
xor ecx, ecx
push edi
xor edi, edi
inc ecx
sub eax, edi
mov dword [ebp - 0x10c], ecx
mov dword [ebp - 4], edi
je 0x40a40d
dec eax
mov eax, dword [esi + 0x4c]
jne 0x40a416
inc eax
shr eax, 1
jmp 0x40a416
mov eax, dword [esi + 0x4c]
add eax, 3
shr eax, 2
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push edi
push edi
lea eax, [ebp - 0x10c]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x40a43f
push str.select
push edi
call fcn.0040a3a3
pop ecx
pop ecx
pop edi
pop esi
leave
ret
Function at 0x40ab22
Capabilities:
Send data
Send data on socket

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x40ab42
push 0x24e
push str.._services_tftpd_thread.c
push str.pTftp_NULL
call fcn.0040f696
add esp, 0xc
add dword [esi + 0x38], 2
push dword [esi + 0x38]
push str.send_OACK__d_bytes
push 0xa
call fcn.004010eb
mov eax, dword [esi + 0x44]
add esp, 0xc
test eax, eax
je 0x40ab7b
push dword [esi + 0x38]
lea ecx, [esi + 0x4064]
push ecx
lea ecx, [esi + 0x4268]
push ecx
push eax
call fcn.0040df01
add esp, 0x10
jmp 0x40ab90
push 0
push dword [esi + 0x38]
lea eax, [esi + 0x4064]
push eax
push dword [esi + 0x20]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jl 0x40ab9e
cmp eax, dword [esi + 0x38]
jne 0x40ab9e
xor eax, eax
inc eax
pop esi
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.send_:_Error__d
push 0
call fcn.004010eb
add esp, 0xc
xor eax, eax
pop esi
ret