joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403914
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, eax
lea eax, [edi + 4]
push eax
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [ebp + 0x10], 0
movzx eax, ax
mov dword [ebp - 4], eax
jne 0x403933
xor edi, edi
push esi
mov esi, dword [sym.imp.WS2_32.dll_send]
push 0
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
call esi
push 0
push 4
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
call esi
pop esi
test edi, edi
jle 0x40396a
push 0
push edi
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.0040d505
add esp, 0x10
pop edi
leave
ret

Function at 0x403bf1
Capabilities:
Resolve dns

Disassembly:
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x403c35
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [esi + 0x408]
push eax
call fcn.004118a0
mov ax, word [edi + 0x404]
mov word [esi + 0x4ae], ax
mov ax, word [edi + 0x402]
mov word [esi + 0x4ac], ax
xor eax, eax
add esp, 0xc
inc eax
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
ret

Function at 0x404bf8
Capabilities:
Hide graphical window

Disassembly:
push ebp
lea ebp, [esp - 0xa4]
sub esp, 0x124
mov eax, dword [0x42a2e4]
xor eax, ebp
mov dword [ebp + 0xa0], eax
push ebx
push esi
mov esi, edx
mov ebx, ecx
push edi
mov dword [ebp - 0x80], ebx
test esi, esi
jne 0x404c38
push 0x92
push str.._guigui_gauges.c
push str.pTftpGui_NULL
call fcn.0040fbb1
add esp, 0xc
cmp dword [esi + 0x18], 1
mov edi, 0x425ea0
je 0x404c48
mov edi, str.from
push dword [esi + 0xc]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push edi
push dword [esi + 4]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x7c]
push str._s__s__s
push eax
call edi
add esp, 0x14
lea eax, [ebp - 0x7c]
push eax
push ebx
mov ebx, dword [sym.imp.USER32.dll_SetWindowTextA]
call ebx
mov esi, dword [esi + 0x2c]
lea eax, [ebp - 0x7c]
test esi, esi
je 0x404c8f
push esi
push str.File_size_:__d
push eax
call edi
add esp, 0xc
jmp 0x404cf0
push str.File_size_:_Unknown
push eax
call edi
pop ecx
pop ecx
push 0
push 0x4b0
push dword [ebp - 0x80]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov esi, dword [sym.imp.USER32.dll_GetDialogBaseUnits]
push 0x206
call esi
shr eax, 0x10
imul eax, eax, 0x23
cdq
and edx, 7
add eax, edx
sar eax, 3
push eax
call esi
movzx eax, ax
imul eax, eax, 0x82
cdq
and edx, 3
add eax, edx
sar eax, 2
push eax
xor eax, eax
push eax
push eax
push eax
push dword [ebp - 0x80]
call dword [sym.imp.USER32.dll_SetWindowPos]
lea eax, [ebp - 0x7c]
push eax
push 0x4b1
push dword [ebp - 0x80]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call ebx
push 5
push dword [ebp - 0x80]
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [ebp + 0xa0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e92f
add ebp, 0xa4
leave
ret
Function at 0x405f2f
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
push dword [ebp + 0xc]
call fcn.0040380a
mov dword [esp], str._Tftpd32__by_Ph._Jounin_MutEx
push 1
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
push str._kill
push dword [ebp + 0xc]
mov edi, eax
call fcn.0040f3a0
pop ecx
pop ecx
test eax, eax
jne 0x405fed
cmp edi, esi
je 0x405f7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x405fed
push 0x441e60
push str.Tftpd32.chm
call fcn.00408052
pop ecx
pop ecx
lea eax, [ebp - 8]
push eax
mov dword [ebp - 4], 1
mov dword [ebp - 8], 8
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
call fcn.00405de5
test eax, eax
je 0x405ff8
push dword [ebp + 8]
push esi
push 0x405721
push 0x65
push esi
call fcn.0040d6ef
mov esi, dword [sym.imp.USER32.dll_UnregisterClassA]
add esp, 0x14
push dword [ebp + 8]
push str.TftpAddIpBackGround
call esi
push dword [ebp + 8]
push str.Ttftpd32ClientBackGround
call esi
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
jmp 0x405ffa
push dword [ebp + 0xc]
push edi
call fcn.00405d4d
pop ecx
pop ecx
xor eax, eax
pop edi
pop esi
leave
ret

Function at 0x406f34
Capabilities:
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0x74]
sub esp, 0x9c
mov eax, dword [0x42a2e4]
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 0x406fdc
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.0040e92f
add ebp, 0x74
leave
ret
Function at 0x406fef
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x74]
sub esp, 0xa8
mov eax, dword [0x42a2e4]
xor eax, ebp
mov dword [ebp + 0x70], eax
mov eax, dword [ebp + 0x7c]
or dword [ebp - 0x18], 0xffffffff
push ebx
push esi
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x18]
push eax
push 0x20019
xor ebx, ebx
push ebx
push str.SOFTWARETFTPD32
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push str.LastWindowPos
push dword [ebp - 0x18]
mov dword [ebp - 0x34], 0x80
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp dword [ebp - 0x18], 0xffffffff
je 0x407060
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x10]
mov byte [ebp + 0x6f], bl
mov esi, ecx
cmp byte [ebp - 0x10], bl
je 0x407118
push edi
mov edi, dword [ebp - 0x24]
cmp byte [esi], 0x20
jne 0x4070bc
mov eax, dword [ebp - 0x14]
inc dword [ebp - 0x14]
sub eax, ebx
mov byte [esi], bl
je 0x4070af
dec eax
je 0x4070a4
dec eax
je 0x40709a
dec eax
jne 0x4070b9
push ecx
call fcn.0040f43c
mov dword [ebp - 0x20], eax
jmp 0x4070b8
push ecx
call fcn.0040f43c
mov edi, eax
jmp 0x4070b8
push ecx
call fcn.0040f43c
mov dword [ebp - 0x28], eax
jmp 0x4070b8
push ecx
call fcn.0040f43c
mov dword [ebp - 0x2c], eax
pop ecx
lea ecx, [esi + 1]
inc esi
cmp byte [esi], bl
jne 0x407075
cmp dword [ebp - 0x14], 4
jne 0x407117
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push ebx
call esi
mov ecx, dword [ebp - 0x2c]
add ecx, 0x96
cmp ecx, eax
jge 0x407117
push 1
call esi
mov ecx, dword [ebp - 0x28]
lea edx, [ecx + 0x96]
cmp edx, eax
jge 0x407117
mov edx, dword [ebp - 0x2c]
cmp edx, edi
jge 0x407117
mov eax, dword [ebp - 0x20]
cmp ecx, eax
jge 0x407117
cmp edx, ebx
jl 0x407117
cmp ecx, ebx
jl 0x407117
push 1
sub eax, ecx
push eax
sub edi, edx
push edi
push ecx
push edx
push dword [ebp - 0x1c]
call dword [sym.imp.USER32.dll_MoveWindow]
pop edi
mov ecx, dword [ebp + 0x70]
mov eax, dword [ebp - 0x30]
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e92f
add ebp, 0x74
leave
ret

Function at 0x407277
Capabilities:
Create process on windows

Disassembly:
push ebp
lea ebp, [esp - 0xec]
sub esp, 0x16c
mov eax, dword [0x42a2e4]
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 edi, [ebp - 0x1f]
call fcn.00404f73
push 0x44
pop edi
push edi
xor esi, esi
lea eax, [ebp - 0x80]
push esi
push eax
call fcn.00411820
add esp, 0xc
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.0040e92f
add ebp, 0xec
leave
ret
Function at 0x407a64
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
lea ebp, [esp - 0xf8]
sub esp, 0x178
mov eax, dword [0x42a2e4]
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.00411820
add esp, 0xc
push 0x80
lea eax, [ebp + 0x74]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x407ad9
lea eax, [ebp + 0x74]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x407ad9
mov eax, dword [eax + 0xc]
test eax, eax
je 0x407ad9
xor ecx, ecx
cmp dword [eax], 0
je 0x407ad6
mov edx, dword [eax]
mov edx, dword [edx]
mov dword [ebp + ecx*8 - 0x7c], edx
inc ecx
add eax, 4
cmp ecx, 0x1e
jl 0x407ac0
mov dword [ebp - 0x80], ecx
push 0x3d
mov eax, 0x434118
pop ecx
mov edi, eax
lea esi, [ebp - 0x80]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
je 0x407b0d
cmp dword [0x42b388], 0x11
push 0x3d
pop ecx
lea esi, [ebp - 0x80]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
je 0x407b0d
push edx
push ebx
push eax
push 0x6d
pop eax
call fcn.0040beb3
add esp, 0xc
mov ecx, dword [ebp + 0xf4]
pop edi
xor eax, eax
pop esi
xor ecx, ebp
inc eax
pop ebx
call fcn.0040e92f
add ebp, 0xf8
leave
ret

Function at 0x407bc0
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
lea ebp, [esp - 0x88]
sub esp, 0x108
mov eax, dword [0x42a2e4]
xor eax, ebp
mov dword [ebp + 0x84], eax
push esi
push 0x100
lea eax, [ebp - 0x7c]
push eax
call sub.WS2_32.dll_gethostname
cmp eax, 0xffffffff
je 0x407c41
lea eax, [ebp - 0x7c]
push eax
call sub.WS2_32.dll_gethostbyname
mov dword [ebp - 0x80], eax
test eax, eax
je 0x407c41
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x407c41
xor esi, esi
cmp dword [ecx], esi
je 0x407c35
mov eax, dword [ebp + 0x94]
push edi
mov edi, dword [eax]
mov eax, dword [ebp + 0x90]
mov eax, dword [eax]
mov edx, ecx
and eax, edi
mov edx, dword [edx]
mov edx, dword [edx]
and edx, edi
cmp edx, eax
je 0x407c34
inc esi
lea edx, [ecx + esi*4]
cmp dword [edx], 0
jne 0x407c21
pop edi
lea ecx, [ecx + esi*4]
cmp dword [ecx], 0
je 0x407c44
mov eax, dword [ecx]
jmp 0x407c57
mov esi, dword [ebp - 0x80]
test esi, esi
jle 0x407c52
mov eax, dword [ebp - 0x80]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
jmp 0x407c57
mov eax, 0x42bb78
mov ecx, dword [ebp + 0x84]
xor ecx, ebp
pop esi
call fcn.0040e92f
add ebp, 0x88
leave
ret
Function at 0x407d4d
Capabilities:
Create thread
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x198
mov eax, dword [0x42a2e4]
xor eax, esp
mov dword [esp + 0x194], eax
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 0x407d86
call fcn.0040826b
jmp 0x407df5
lea eax, [esp + 8]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x407dc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x276c
mov eax, str.Error:_Tftpd32_now_requires_winsock_version_2
je 0x407dae
mov eax, str.Error:_Cant_init_Winsocket
push 0x10
push 0x4258cc
push eax
push 0
call fcn.0040c856
add esp, 0x10
jmp 0x407df5
push 0
push 0
push 0x407fb4
call fcn.0040ec4b
add esp, 0xc
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push edi
call fcn.00405f2f
pop ecx
pop ecx
call dword [sym.imp.WS2_32.dll_WSACleanup]
push str.Thats_all_folks_n
call fcn.0040cc99
pop ecx
mov ecx, dword [esp + 0x19c]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.0040e92f
mov esp, ebp
pop ebp
ret 0x10

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x42a2e4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor esi, esi
push 0x441d40
push dword [esi + 0x42b970]
push dword [esi + 0x42b974]
push dword [esi + 0x42b96c]
push dword [esi + 0x42b968]
push str.SOFTWARETFTPD32
call fcn.0040cd03
add esi, 0x10
add esp, 0x18
cmp esi, 0x210
jb 0x408145
cmp dword [0x42b5f4], 0
jne 0x40818d
mov dword [0x42b5f4], 0x2f
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 0x4081d1
lea eax, [ebp - 0x108]
push eax
call fcn.0040d217
pop ecx
test eax, eax
je 0x4081d1
push 0
push 0x42b858
push esi
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x408200
push edi
mov edi, 0x42b4a0
push edi
call fcn.0040d217
pop ecx
test eax, eax
je 0x4081f3
push 0
push 0x42b858
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x4081ff
push 0x42b858
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.0040e92f
leave
ret
Function at 0x408693
Capabilities:
Create udp socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x42a2e4]
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, 0x425704
je 0x4086cf
mov eax, 0x426988
push eax
push esi
call dword [sym.imp.WS2_32.dll_getservbyname]
test eax, eax
je 0x4086e1
mov ax, word [eax + 8]
jmp 0x4086ea
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
test edi, edi
je 0x4086f7
cmp byte [edi], 0
jne 0x4086fc
mov edi, 0x426ad4
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.0040e92f
leave
ret

Function at 0x40879d
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 + 0x424cd4]
push edi
mov edi, ebp
xor ebx, ebx
shl edi, 4
cmp eax, 1
jl 0x4087fa
push dword [esi + 0x424ce4]
mov ecx, dword [esi + 0x424cdc]
push dword [esi + 0x424ce0]
mov dword [edi + 0x443220], ebx
push dword [ecx]
mov ecx, dword [esi + 0x424cd8]
push eax
push dword [esi + 0x424cc0]
call fcn.00408485
add esp, 0x14
mov dword [edi + 0x44322c], eax
cmp eax, 0xffffffff
jne 0x408801
xor eax, eax
jmp 0x40885c
or dword [edi + 0x44322c], 0xffffffff
cmp dword [esi + 0x424ce8], ebx
je 0x40882c
push ebx
push ebx
push dword [esi + 0x424ccc]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [edi + 0x443228], eax
cmp eax, 0xffffffff
jne 0x408833
mov eax, ebp
call fcn.00408659
jmp 0x4087f6
or dword [edi + 0x443228], 0xffffffff
push ebx
push dword [esi + 0x424cd0]
push dword [esi + 0x424cc8]
call fcn.0040ec4b
add esp, 0xc
mov dword [edi + 0x443224], eax
cmp eax, 0xffffffff
je 0x408823
xor eax, eax
inc eax
mov dword [edi + 0x443220], eax
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x408baa
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 0x408be1
push dword [ebp + 8]
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x408be1
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [ebp - 4]
push eax
call fcn.004118a0
add esp, 0xc
mov eax, dword [ebp - 4]
leave
ret
Function at 0x408cd5
Capabilities:
Delete file
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x204
mov eax, dword [0x42a2e4]
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 [0x434529], ax
call esi
push 0
push 4
push 0x434529
push dword [0x43c550]
mov word [0x43452b], ax
call dword [sym.imp.WS2_32.dll_send]
call fcn.00408be6
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 0x4258cc
lea eax, [ebp - 0x204]
push eax
push dword [0x434214]
call fcn.0040c856
add esp, 0x10
push 0
push 1
push dword [0x434220]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
cmp byte [0x434228], 1
pop esi
jne 0x408d7b
cmp dword [0x43c54c], 0
je 0x408d7b
push 0x434229
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.0040e92f
leave
ret
Function at 0x409151
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, 0x43852f
mov edi, 0x200
cmp byte [ebp], 0
je 0x409295
mov eax, ebp
mov ecx, 0x43852d
sub eax, ecx
mov esi, ebp
add eax, 0xfffffffe
jmp 0x409186
cmp byte [esi], 0
je 0x40918a
inc esi
inc eax
cmp eax, edi
jl 0x40917f
inc esi
mov eax, esi
sub eax, ecx
dec eax
dec eax
cmp eax, edi
je 0x40929d
cmp byte [0x434228], 1
jne 0x409200
push str.tsize
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x409200
push esi
call fcn.0040f43c
pop ecx
push 4
mov dword [0x43c578], eax
call ebx
push 0
mov word [0x434529], ax
call ebx
push 0
push dword [0x43c564]
mov word [0x43452b], ax
push 0x659
push dword [0x434214]
call dword [sym.imp.USER32.dll_SetTimer]
push 0
push 4
push 0x434529
push dword [0x43c550]
call dword [sym.imp.WS2_32.dll_send]
push str.blksize
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40921c
push esi
call fcn.0040f43c
pop ecx
mov dword [0x43c584], eax
push str.udpport
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x409279
push esi
call fcn.0040f43c
push eax
push str.Port_value_is__d
call fcn.0040cc99
push esi
call fcn.0040f43c
add esp, 0x10
push eax
call ebx
push 0x10
push 0x43c534
push dword [0x43c550]
mov word [0x43c536], 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.0040cc99
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebp, [eax + esi + 1]
mov eax, ebp
sub eax, 0x43852d
dec eax
dec eax
cmp eax, edi
jl 0x409165
xor eax, eax
inc eax
pop edi
pop esi
pop ebp
pop ebx
ret
xor eax, eax
jmp 0x409298

Function at 0x4092a1
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 [0x43c54c], edi
mov dword [ebp - 8], 0x10
mov esi, 0x43c534
cmp dword [0x43c554], edi
jne 0x4092e2
lea eax, [ebp - 8]
push eax
push esi
push edi
push 0x4004
push 0x43852d
push dword [0x43c550]
call dword [sym.imp.WS2_32.dll_recvfrom]
jmp 0x4092f9
push edi
push 0x4004
push 0x43852d
push dword [0x43c550]
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x409305
xor eax, eax
jmp 0x409331
cmp dword [0x43c554], edi
jne 0x409326
push 0x10
push esi
push dword [0x43c550]
call dword [sym.imp.WS2_32.dll_connect]
mov dword [0x43c554], 1
mov eax, dword [ebp - 4]
mov dword [0x43c54c], eax
xor eax, eax
inc eax
pop edi
pop esi
leave
ret
Function at 0x409335
Capabilities:
Get file size

Disassembly:
movzx eax, byte [0x434228]
dec eax
push ebx
push ebp
push esi
push edi
je 0x4093a9
dec eax
jne 0x409398
xor edi, edi
push edi
push 0x8000020
push 3
push edi
push 1
push accept
mov esi, 0x434229
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x43c558], eax
cmp eax, 0xffffffff
jne 0x40938b
call fcn.0040cc32
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.00408cd5
add esp, 0x10
jmp 0x4093a4
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x43c578], eax
xor eax, eax
cmp dword [0x43c558], 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, 0x434229
push esi
call edi
mov dword [0x43c558], eax
cmp eax, 0xffffffff
jne 0x409398
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
jne 0x409398
push 3
push 0x4258cc
push str.File_exists__overwrite_it__
push dword [0x434214]
call fcn.0040c856
add esp, 0x10
cmp eax, 6
jne 0x409398
xor eax, eax
push eax
push ebp
push 2
push eax
push eax
push ebx
push esi
call edi
mov dword [0x43c558], eax
cmp eax, 0xffffffff
jne 0x409398
call fcn.0040cc32
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 0x409381
Function at 0x40a85c
Capabilities:
Send data
Send data on socket

Disassembly:
cmp dword [ebx + 0x20], 0xffffffff
jne 0x40a865
xor eax, eax
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 + 0xc]
mov word [esi], ax
call edi
mov word [esi + 2], ax
xor eax, eax
cmp dword [0x42b390], eax
mov edi, 0x42b390
jl 0x40a8a3
mov ecx, dword [edi]
cmp ecx, dword [esp + 0xc]
je 0x40a89f
add edi, 8
cmp dword [edi], eax
jge 0x40a890
cmp dword [edi], eax
jge 0x40a8ba
mov eax, dword [esp + 0xc]
add eax, 0xffffff9c
push eax
call fcn.0041100d
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
neg eax
pop edi
sbb eax, eax
pop esi
ret

Function at 0x40a945
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1b4]
sub esp, 0x234
mov eax, dword [0x42a2e4]
xor eax, ebp
mov dword [ebp + 0x1b0], eax
push ebx
push esi
mov esi, ecx
push edi
lea eax, [esi + 0x44ac]
push eax
lea ebx, [esi + 0x4504]
push ebx
call fcn.0040e7cf
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop ecx
pop ecx
push 0x42b858
lea eax, [ebp - 0x7c]
push eax
call edi
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x40a9a6
cmp byte [ebp + eax - 0x7d], 0x5c
je 0x40a9a6
mov byte [ebp + eax - 0x7c], 0x5c
inc eax
add esi, 0x427a
push esi
lea eax, [ebp + eax - 0x7c]
push eax
call edi
push str..md5
lea eax, [ebp - 0x7c]
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 edi, eax
mov dword [ebp - 0x80], esi
mov eax, dword [ebp - 0x80]
movzx ecx, byte [ebx + 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 0x40a9e4
push esi
lea eax, [ebp - 0x80]
push eax
push 0x20
lea eax, [ebp + 0x18c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
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.0040e92f
add ebp, 0x1b4
leave
ret