Function at 0x40c962
Capabilities:
Get file size
Set socket configuration

Disassembly:
mov eax, 0x55e3b0
call fcn.0053c1d0
sub esp, 0x1b8
mov eax, dword [0x5af710]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
xor eax, ebp
test edi, edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x7c], ebx
je 0x40d4f1
cmp byte [edi], 0
je 0x40d4f1
test ebx, ebx
je 0x40d4f1
cmp byte [ebx], 0
je 0x40d4f1
push 1
push 2
lea ecx, [ebp - 0x1c4]
call fcn.00404a20
and dword [ebp - 4], 0
mov esi, 0x572a6c
push esi
push ebx
mov eax, 0x572bf8
push eax
push str.LocalPath
push esi
push edi
push eax
lea eax, [ebp - 0x1c4]
push str.ServerPath
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x1c4]
call fcn.00407320
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 1
jb 0x40ca3e
mov eax, dword [eax + 4]
jmp 0x40ca41
add eax, 4
push eax
lea ecx, [ebp - 0x48]
call fcn.00405500
push 0
push 1
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 3
call fcn.00402c50
mov edi, dword [ebp - 0x34]
add edi, 0x25
push edi
lea ecx, [ebp - 0x8c]
call fcn.00402b40
mov ebx, dword [ebp - 0x8c]
mov dword [ebx], 0x512
mov dword [ebx + 4], 0x24
mov eax, dword [ebp - 0x34]
mov dword [ebx + 0x18], eax
mov word [ebx + 0x14], 0x5001
cmp dword [ebp - 0x30], 0x10
mov eax, dword [ebp - 0x44]
jae 0x40ca97
lea eax, [ebp - 0x44]
push eax
lea eax, [ebx + 0x24]
push eax
call fcn.0053c4b0
pop ecx
pop ecx
push str.127.0.0.1
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov ecx, dword [0x5b096c]
push eax
call fcn.0040ba5e
push eax
lea ecx, [ebp - 0x58]
call fcn.004013c0
or dword [ebp - 0x28], 0xffffffff
mov word [ebp - 0x24], 2
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x2c], 0x572c04
push 5
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 5
call fcn.005087d6
test eax, eax
jne 0x40d4a7
push eax
dec edi
push edi
push ebx
push dword [ebp - 0x28]
call fcn.00503ed7
push dword [ebp - 0x88]
xor edi, edi
push edi
push ebx
call fcn.0053c340
push 0x14
push edi
push 0x24
push ebx
push dword [ebp - 0x28]
call fcn.00503f15
add esp, 0x30
test eax, eax
jle 0x40d26f
cmp word [ebx + 0x14], 0x5001
jne 0x40d26f
cmp word [ebx + 0x16], 1
je 0x40d044
push edi
push 0x80
push 3
push edi
push 3
push bind
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40d03c
lea eax, [ebp - 0x80]
push eax
xor ebx, ebx
push edi
mov dword [ebp - 0x80], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x84], eax
jne 0x40cb8a
cmp dword [ebp - 0x80], ebx
jne 0x40cb8a
mov dword [ebp - 0x84], ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x80]
xor eax, eax
or edi, eax
mov eax, dword [ebp - 0x5c]
mov ecx, dword [eax + 0x48]
mov eax, dword [eax + 0x4c]
xor ebx, ebx
or ebx, dword [ebp - 0x84]
cmp ebx, ecx
jne 0x40cdf6
cmp edi, eax
jne 0x40cdf6
push 0x572aed
lea ecx, [ebp - 0x78]
call fcn.00405500
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x1c0]
mov byte [ebp - 4], 6
call fcn.0040bb6a
xor ebx, ebx
push 0
inc ebx
push ebx
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 5
call fcn.00402c50
push 0x572cc8
push dword [ebp - 0x7c]
lea eax, [ebp - 0x1c4]
push 0x572cbc
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
mov edi, 0x204
cmp dword [0x5b21c0], edi
pop ecx
pop ecx
jne 0x40cde9
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push ebx
push 2
lea ecx, [ebp - 0x144]
call fcn.00404a20
push esi
lea eax, [ebp - 0xc4]
push eax
lea ecx, [ebp - 0x1c4]
mov byte [ebp - 4], 7
call fcn.00407320
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 8
jb 0x40cc65
mov eax, dword [eax + 4]
jmp 0x40cc68
add eax, 4
push eax
push 0x572a4c
push esi
push 0x572a48
push edi
push 0x572a40
push dword [ebp - 0x60]
mov eax, 0x572a3c
push eax
push dword [ebp - 0x62]
mov edx, 0x572a38
push eax
push dword [ebp - 0x64]
mov ecx, 0x572a34
push edx
push dword [ebp - 0x66]
push ecx
push dword [ebp - 0x6a]
push ecx
push dword [ebp - 0x6c]
push edx
push 0x151
push eax
push 0x5c
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x5c], esp
push str..DownLoadFile.cpp
call fcn.00405500
lea eax, [ebp - 0xa8]
push eax
call fcn.00407150
add esp, 0x24
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 9
jb 0x40ccd9
mov eax, dword [eax + 4]
jmp 0x40ccdc
add eax, 4
push eax
lea eax, [ebp - 0x144]
push 0x572a0c
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push 0
push ebx
lea ecx, [ebp - 0xa8]
call fcn.00402c50
push 0
push ebx
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 7
call fcn.00402c50
lea eax, [ebp - 0x144]
push eax
call fcn.00407930
pop ecx
lea ecx, [ebp - 0xf8]
mov byte [ebp - 4], 5
call fcn.004028d0
lea ecx, [ebp - 0xf8]
mov dword [ebp - 0xf8], 0x572840
call fcn.0054dfcb
mov ebx, dword [ebp - 0x8c]
xor esi, esi
jmp 0x40d4aa
push 0x572aed
lea ecx, [ebp - 0x78]
call fcn.00405500
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x1c0]
mov byte [ebp - 4], 0xa
call fcn.0040bb6a
push 0
push 1
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 5
call fcn.00402c50
mov ecx, dword [ebp - 0x5c]
push dword [ecx + 0x4c]
mov eax, dword [ecx + 0x48]
push eax
push 0x572c94
push edi
push ebx
lea eax, [ebp - 0x1c4]
push 0x572c68
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.0040bcd7
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.0040bcd7
mov edi, 0x204
cmp dword [0x5b21c0], edi
jne 0x40d036
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 1
push 2
lea ecx, [ebp - 0x144]
call fcn.00404a20
push esi
lea eax, [ebp - 0xa8]
push eax
lea ecx, [ebp - 0x1c4]
mov byte [ebp - 4], 0xb
call fcn.00407320
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 0xc
jb 0x40ceb0
mov eax, dword [eax + 4]
jmp 0x40ceb3
add eax, 4
push eax
push 0x572a4c
push esi
push 0x572a48
push edi
push 0x572a40
push dword [ebp - 0x60]
mov eax, 0x572a3c
push eax
push dword [ebp - 0x62]
mov edx, 0x572a38
push eax
push dword [ebp - 0x64]
mov ecx, 0x572a34
push edx
push dword [ebp - 0x66]
push ecx
push dword [ebp - 0x6a]
push ecx
push dword [ebp - 0x6c]
push edx
push 0x156
push eax
push 0x5c
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x5c], esp
push str..DownLoadFile.cpp
call fcn.00405500
lea eax, [ebp - 0xc4]
push eax
call fcn.00407150
add esp, 0x24
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 0xd
jb 0x40cf24
mov eax, dword [eax + 4]
jmp 0x40cf27
add eax, 4
push eax
lea eax, [ebp - 0x144]
push 0x572a0c
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0xc4]
call fcn.00402c50
push 0
push 1
lea ecx, [ebp - 0xa8]
mov byte [ebp - 4], 0xb
call fcn.00402c50
lea eax, [ebp - 0x144]
push eax
call fcn.00407930
pop ecx
lea ecx, [ebp - 0xf8]
mov byte [ebp - 4], 5
call fcn.004028d0
lea ecx, [ebp - 0xf8]
mov dword [ebp - 0xf8], 0x572840
call fcn.0054dfcb
mov ebx, dword [ebp - 0x8c]
push 2
pop esi
jmp 0x40d4aa
push 0x572aed
lea ecx, [ebp - 0x78]
call fcn.00405500
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x1c0]
mov byte [ebp - 4], 0xe
call fcn.0040bb6a
push edi
push 1
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 5
call fcn.00402c50
push dword [ebp - 0x7c]
lea eax, [ebp - 0x1c4]
push 0x572c54
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
mov edi, 0x204
cmp dword [0x5b21c0], edi
pop ecx
pop ecx
jne 0x40d267
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 1
push 2
lea ecx, [ebp - 0x144]
call fcn.00404a20
push esi
lea eax, [ebp - 0xa8]
push eax
lea ecx, [ebp - 0x1c4]
mov byte [ebp - 4], 0xf
call fcn.00407320
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 0x10
jb 0x40d0e1
mov eax, dword [eax + 4]
jmp 0x40d0e4
add eax, 4
push eax
push 0x572a4c
push esi
push 0x572a48
push edi
push 0x572a40
push dword [ebp - 0x60]
mov eax, 0x572a3c
push eax
push dword [ebp - 0x62]
mov edx, 0x572a38
push eax
push dword [ebp - 0x64]
mov ecx, 0x572a34
push edx
push dword [ebp - 0x66]
push ecx
push dword [ebp - 0x6a]
push ecx
push dword [ebp - 0x6c]
push edx
push 0x15c
push eax
push 0x5c
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x5c], esp
push str..DownLoadFile.cpp
call fcn.00405500
lea eax, [ebp - 0xc4]
push eax
call fcn.00407150
add esp, 0x24
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 0x11
jb 0x40d155
mov eax, dword [eax + 4]
jmp 0x40d158
add eax, 4
push eax
lea eax, [ebp - 0x144]
push 0x572a0c
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0xc4]
call fcn.00402c50
push 0
push 1
lea ecx, [ebp - 0xa8]
mov byte [ebp - 4], 0xf
call fcn.00402c50
lea eax, [ebp - 0x144]
push eax
call fcn.00407930
pop ecx
lea ecx, [ebp - 0xf8]
mov byte [ebp - 4], 5
call fcn.004028d0
lea ecx, [ebp - 0xf8]
mov dword [ebp - 0xf8], 0x572840
call fcn.0054dfcb
xor esi, esi
inc esi
jmp 0x40d4aa
push 0x572aed
lea ecx, [ebp - 0x78]
call fcn.00405500
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x1c0]
mov byte [ebp - 4], 0x12
call fcn.0040bb6a
push edi
push 1
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 5
call fcn.00402c50
mov ecx, dword [0x5b096c]
push 0x572c30
call fcn.0040ba5e
push eax
lea eax, [ebp - 0x1c4]
push 0x572c28
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
mov edi, 0x204
cmp dword [0x5b21c0], edi
pop ecx
pop ecx
jne 0x40d4a7
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 1
push 2
lea ecx, [ebp - 0x144]
call fcn.00404a20
push esi
lea eax, [ebp - 0xa8]
push eax
lea ecx, [ebp - 0x1c4]
mov byte [ebp - 4], 0x13
call fcn.00407320
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 0x14
jb 0x40d321
mov eax, dword [eax + 4]
jmp 0x40d324
add eax, 4
push eax
push 0x572a4c
push esi
push 0x572a48
push edi
push 0x572a40
push dword [ebp - 0x60]
mov eax, 0x572a3c
push eax
push dword [ebp - 0x62]
mov edx, 0x572a38
push eax
push dword [ebp - 0x64]
mov ecx, 0x572a34
push edx
push dword [ebp - 0x66]
push ecx
push dword [ebp - 0x6a]
push ecx
push dword [ebp - 0x6c]
push edx
push 0x161
push eax
push 0x5c
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x5c], esp
push str..DownLoadFile.cpp
call fcn.00405500
lea eax, [ebp - 0xc4]
push eax
call fcn.00407150
add esp, 0x24
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 0x15
jb 0x40d395
mov eax, dword [eax + 4]
jmp 0x40d398
add eax, 4
push eax
lea eax, [ebp - 0x144]
push 0x572a0c
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.00403f50
push eax
call fcn.00403980
pop ecx
pop ecx
mov ecx, eax
call fcn.004040c0
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push eax
call fcn.00403980
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0xc4]
call fcn.00402c50
push 0
push 1
lea ecx, [ebp - 0xa8]
mov byte [ebp - 4], 0x13
call fcn.00402c50
lea eax, [ebp - 0x144]
push eax
call fcn.00407930
pop ecx
lea ecx, [ebp - 0xf8]
mov byte [ebp - 4], 5
call fcn.004028d0
lea ecx, [ebp - 0xf8]
mov dword [ebp - 0xf8], 0x572840
call fcn.0054dfcb
or esi, 0xffffffff
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 4
call fcn.0040b997
push ebx
call fcn.0055047a
pop ecx
push 0
push 1
lea ecx, [ebp - 0x48]
call fcn.00402c50
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x178]
call fcn.004028d0
lea ecx, [ebp - 0x178]
mov dword [ebp - 0x178], 0x572840
call fcn.0054dfcb
mov eax, esi
jmp 0x40d4f4
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0053aaae
leave
ret 8