Function at 0x402b40
Capabilities:
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x411ec9
mov eax, dword fs:[0]
push eax
mov eax, 0x1228
call fcn.004054c0
mov eax, dword [0x41788c]
xor eax, esp
mov dword [esp + 0x1224], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41788c]
xor eax, esp
push eax
lea eax, [esp + 0x123c]
mov dword fs:[0], eax
xor ebx, ebx
cmp dword [0x418f78], 1
mov dword [esp + 0x1244], ebx
jne 0x402b99
push 1
call dword [sym.imp.KERNEL32.dll_ExitThread]
mov esi, 0xf
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
push 9
push str.download_
lea ecx, [esp + 0x64]
mov byte [esp + 0x124c], 1
mov dword [esp + 0x7c], esi
mov dword [esp + 0x78], ebx
mov byte [esp + 0x68], 0
call fcn.004025c0
mov eax, dword [esp + 0x1250]
mov ebp, 0x10
mov byte [esp + 0x1244], 2
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebx
cmp dword [esp + 0x1264], ebp
jae 0x402bff
lea eax, [esp + 0x1250]
mov edx, dword [0x418b04]
push ebx
push ebx
lea ecx, [esp + 0x80]
push ecx
push eax
push edx
call dword [sym.imp.WININET.dll_FtpFindFirstFileA]
mov edi, eax
mov eax, dword [esp + 0x1250]
cmp edi, ebx
jne 0x402cc3
cmp dword [esp + 0x1264], ebp
jae 0x402c38
lea eax, [esp + 0x1250]
push eax
lea eax, [esp + 0x1bc]
push str.Cant_find__s_file_at_Server.
push eax
call fcn.004017b0
add esp, 0xc
push ebx
push str.Notice
lea ecx, [esp + 0x1c0]
push ecx
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp dword [esp + 0x74], ebp
jb 0x402c76
mov edx, dword [esp + 0x60]
push edx
call fcn.0040474e
add esp, 4
mov dword [esp + 0x74], esi
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], 0
cmp dword [esp + 0x58], ebp
jb 0x402c96
mov eax, dword [esp + 0x44]
push eax
call fcn.0040474e
add esp, 4
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], 0
cmp dword [esp + 0x1264], ebp
jb 0x402cbc
mov ecx, dword [esp + 0x1250]
push ecx
call fcn.0040474e
add esp, 4
xor eax, eax
jmp 0x4031b0
cmp dword [esp + 0x1264], ebp
jae 0x402cd3
lea eax, [esp + 0x1250]
mov edx, dword [esp + 0x98]
push edx
push ebx
push eax
lea eax, [esp + 0x1c4]
push str._s___d____d_
push eax
call fcn.004017b0
lea ecx, [esp + 0x1cc]
push ecx
push 0x80
push 0x418d80
call fcn.0040519b
mov edx, dword [0x418f0c]
add esp, 0x20
push edx
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
push 0xc0c0c0
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
mov eax, dword [0x418ea0]
push eax
push 0x4170a0
push esi
call dword [sym.imp.USER32.dll_FillRect]
push ebx
push esi
call dword [sym.imp.GDI32.dll_SetTextColor]
mov eax, 0x418d80
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x402d46
sub eax, ecx
push eax
push 0x418d80
push 0x118
push 2
push esi
call dword [sym.imp.GDI32.dll_TextOutA]
mov ecx, dword [0x418f0c]
push 0
push 0
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
mov edx, dword [esp + 0x98]
mov eax, dword [0x418e90]
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
push edx
push 1
push 0x406
push eax
call ebx
mov ecx, dword [0x418e90]
push 0
push 1
push 0x402
push ecx
call ebx
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esp + 0x1250]
cmp dword [esp + 0x1264], ebp
jae 0x402dc1
lea eax, [esp + 0x1250]
mov edx, dword [0x418b04]
push 0
push 2
push 0x80000000
push eax
push edx
call dword [sym.imp.WININET.dll_FtpOpenFileA]
mov edi, dword [esp + 0x1264]
mov ebx, dword [esp + 0x1250]
mov dword [esp + 0x1c], eax
mov eax, ebx
cmp edi, ebp
jae 0x402df7
lea eax, [esp + 0x1250]
mov ecx, str.game.exe
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402e20
test dl, dl
je 0x402e1c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402e20
add eax, 2
add ecx, 2
test dl, dl
jne 0x402e00
xor eax, eax
jmp 0x402e25
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov eax, ebx
jne 0x402e93
cmp edi, ebp
jae 0x402e36
lea eax, [esp + 0x1250]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x403003
push 0
push str.Notice
push str.Game_execute_file_create_fail.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x5c]
call fcn.00402120
lea ecx, [esp + 0x40]
call fcn.00402120
lea ecx, [esp + 0x124c]
call fcn.00402120
xor eax, eax
jmp 0x4031b0
cmp edi, ebp
jae 0x402e9e
lea eax, [esp + 0x1250]
mov ecx, str.Patcher.exe
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402ec3
test dl, dl
je 0x402ebf
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402ec3
add eax, 2
add ecx, 2
test dl, dl
jne 0x402ea3
xor eax, eax
jmp 0x402ec8
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov eax, ebx
jne 0x402f0e
cmp edi, ebp
jae 0x402ed9
lea eax, [esp + 0x1250]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x403003
push 0
push str.Notice
push str.Patcher_execute_file_create_fail.
jmp 0x402e66
cmp edi, ebp
jae 0x402f19
lea eax, [esp + 0x1250]
mov ecx, str.FileEngineR.dll
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402f40
test dl, dl
je 0x402f3c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402f40
add eax, 2
add ecx, 2
test dl, dl
jne 0x402f20
xor eax, eax
jmp 0x402f45
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x402f8b
mov eax, ebx
cmp edi, ebp
jae 0x402f56
lea eax, [esp + 0x1250]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x403003
push 0
push str.Notice
push str.FileEngineR_Library_file_create_fail.
jmp 0x402e66
lea eax, [esp + 0x124c]
push eax
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.00402a90
add esp, 0xc
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x4c]
mov byte [esp + 0x1250], 3
call fcn.004024e0
lea ecx, [esp + 0x24]
call fcn.00402120
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x58], ebp
jae 0x402fd2
lea eax, [esp + 0x44]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x403003
push 0
push str.Notice
push str.File_create_fail.
jmp 0x402e66
mov ebp, dword [sym.imp.WININET.dll_InternetReadFile]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
nop
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x18]
push eax
push 0x1000
lea ecx, [esp + 0x240]
push ecx
push edx
call ebp
mov ecx, dword [esp + 0x18]
push 0
lea eax, [esp + 0x24]
push eax
push ecx
lea edx, [esp + 0x244]
push edx
push edi
call ebx
mov eax, dword [esp + 0x18]
add dword [esp + 0x14], eax
cmp dword [esp + 0x1264], 0x10
mov eax, dword [esp + 0x1250]
jae 0x403060
lea eax, [esp + 0x1250]
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0x14]
push ecx
push edx
push eax
lea eax, [esp + 0x1c4]
push str._s___d____d_
push eax
call fcn.004017b0
lea ecx, [esp + 0x1cc]
push ecx
push 0x80
push 0x418d80
call fcn.0040519b
add esp, 0x20
push 0xc0c0c0
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
mov edx, dword [0x418ea0]
push edx
push 0x4170a0
push esi
call dword [sym.imp.USER32.dll_FillRect]
push 0
push esi
call dword [sym.imp.GDI32.dll_SetTextColor]
mov eax, 0x418d80
lea ecx, [eax + 1]
lea ebx, [ebx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4030d0
sub eax, ecx
push eax
push 0x418d80
push 0x118
push 2
push esi
call dword [sym.imp.GDI32.dll_TextOutA]
mov eax, dword [0x418f0c]
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [esp + 0x14]
mov edx, dword [0x418e90]
push 0
push ecx
push 0x402
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
cmp dword [esp + 0x18], 0
ja 0x403010
mov eax, dword [0x418f0c]
push esi
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
xor ebx, ebx
cmp edi, ebx
je 0x40313b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40314a
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, 0x10
cmp dword [esp + 0x74], esi
jb 0x403162
mov ecx, dword [esp + 0x60]
push ecx
call fcn.0040474e
add esp, 4
mov edi, 0xf
mov dword [esp + 0x74], edi
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], bl
cmp dword [esp + 0x58], esi
jb 0x403186
mov edx, dword [esp + 0x44]
push edx
call fcn.0040474e
add esp, 4
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
cmp dword [esp + 0x1264], esi
jb 0x4031ab
mov eax, dword [esp + 0x1250]
push eax
call fcn.0040474e
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x123c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1224]
xor ecx, esp
call fcn.00404e58
add esp, 0x1234
ret