Function at 0x45ed90
Capabilities:
Check if file exists
Delete file
Move file
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x56d380]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
push edi
lea ecx, [ebp - 0x59]
call fcn.0044d980
xor esi, esi
push 0x14
push str.gateway.5211game.com
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0xc], 0xf
mov dword [ebp - 0x10], esi
mov byte [ebp - 0x20], 0
call fcn.0040fa80
xor eax, eax
cmp dword [ebp - 0xc], 0x10
mov word [ebp - 0x3c], ax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], esi
jae 0x45edf1
lea eax, [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
push ecx
push eax
lea edx, [ebp - 0x58]
push edx
call fcn.00469da0
mov ecx, eax
call fcn.0046a2b0
push eax
lea ecx, [ebp - 0x3c]
call fcn.0045ed00
mov edi, 8
cmp dword [ebp - 0x44], edi
jb 0x45ee25
mov eax, dword [ebp - 0x58]
push eax
call fcn.004fe49e
add esp, 4
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x28], edi
jae 0x45ee30
lea eax, [ebp - 0x3c]
push eax
push str.gatewayDomain:_s
call fcn.0045f340
push eax
call fcn.0042d870
add esp, 0xc
call fcn.0045f340
cmp dword [eax + 0x1048], 1
je 0x45efb2
push str.CDNSThread::DealProc_begin_
call fcn.0045f340
push eax
call fcn.0042d870
add esp, 8
push 0xc8
mov ecx, ebx
call fcn.0045e370
call fcn.0045f340
cmp dword [eax + 0x10ac], esi
je 0x45eeb6
cmp dword [ebp - 0x28], edi
jb 0x45ee93
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.004fe49e
add esp, 4
xor edx, edx
cmp dword [ebp - 0xc], 0x10
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], esi
mov word [ebp - 0x3c], dx
jb 0x45f281
mov eax, dword [ebp - 0x20]
push eax
jmp 0x45f279
cmp dword [ebp - 0xc], 0x10
mov eax, dword [ebp - 0x20]
jae 0x45eec2
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x74]
push ecx
push eax
lea ecx, [ebp - 0x59]
call fcn.0044e250
test eax, eax
jle 0x45f184
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp - 0x74]
sar eax, 2
push eax
push str.GetDnsIPList_Succ_count_d
call fcn.0045f340
push eax
call fcn.0042d870
mov edx, dword [0x56c260]
mov eax, dword [edx + 0xc]
add esp, 0xc
mov ecx, 0x56c260
call eax
add eax, 0x10
mov dword [ebp - 0x60], eax
call fcn.0045f340
mov ecx, dword [eax + 0x10b4]
push ecx
push str.Config_
call fcn.0045f340
mov edx, dword [eax + 0x1064]
push edx
lea eax, [ebp - 0x60]
push 0x5462c0
push eax
call fcn.00428a30
add esp, 0x14
push 0x556338
push 0x53d38c
lea ecx, [ebp - 0x60]
call fcn.00423850
mov esi, dword [ebp - 0x60]
push ecx
add esi, 0xfffffff0
mov edi, esp
push esi
call fcn.00403b50
add esp, 4
lea ecx, [ebp - 0x74]
add eax, 0x10
push ecx
mov ecx, ebx
mov dword [edi], eax
call fcn.0045eb70
movzx edi, al
push edi
call fcn.0045f340
mov edx, dword [eax + 0x10b4]
push edx
push str.SaveToLocal__s__result_d
call fcn.0045f340
push eax
call fcn.0042d870
add esp, 0x10
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x45efa8
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
xor esi, esi
test edi, edi
jne 0x45f24d
mov edx, dword [0x56c260]
mov eax, dword [edx + 0xc]
mov ecx, 0x56c260
call eax
add eax, 0x10
mov dword [ebp - 0x60], eax
call fcn.0045f340
mov ecx, dword [eax + 0x10b4]
push ecx
push str.Config_
call fcn.0045f340
mov edx, dword [eax + 0x1064]
push edx
lea eax, [ebp - 0x60]
push str._s_s_s.tmp
push eax
call fcn.00428a30
add esp, 0x14
push 0x556338
push 0x53d38c
lea ecx, [ebp - 0x60]
call fcn.00423850
mov edi, dword [ebp - 0x60]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push edi
call ebx
test eax, eax
je 0x45f037
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x45f037
push edi
push str.deleteFile__s__Fail_
call fcn.0045f340
push eax
call fcn.0042d870
add esp, 0xc
call fcn.0045f340
mov ecx, dword [eax + 0x10b8]
push ecx
call dword [sym.imp.WININET.dll_DeleteUrlCacheEntryW]
lea ecx, [ebp - 0x50]
call fcn.0043bb90
call fcn.0045f340
mov eax, dword [eax + 0x10b8]
lea edx, [ebp - 0x7c]
push edx
push esi
push edi
push eax
push esi
lea ecx, [ebp - 0x50]
call fcn.0043c280
test eax, eax
je 0x45f2db
call fcn.0045f340
mov eax, dword [eax + 0x10b8]
push eax
push str.DownloadUrl__s__succ_
call fcn.0045f340
push eax
call fcn.0042d870
add esp, 0xc
push edi
push esi
push str.count
push str.config
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
jle 0x45f2c3
mov edx, dword [0x56c260]
mov eax, dword [edx + 0xc]
mov ecx, 0x56c260
call eax
mov edx, dword [0x56c260]
add eax, 0x10
mov dword [ebp - 0x64], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x56c260
call eax
add eax, 0x10
mov dword [ebp - 0x60], eax
call fcn.0045f340
mov ecx, dword [eax + 0x10b4]
push ecx
push str.Config_
call fcn.0045f340
mov edx, dword [eax + 0x1064]
push edx
lea eax, [ebp - 0x64]
push 0x5462c0
push eax
call fcn.00428a30
add esp, 0x14
push 0x556338
push 0x53d38c
lea ecx, [ebp - 0x64]
call fcn.00423850
mov esi, dword [ebp - 0x64]
push esi
lea ecx, [ebp - 0x60]
push str._s.old
push ecx
call fcn.00428a30
add esp, 0xc
push esi
call ebx
test eax, eax
je 0x45f1a8
mov edx, dword [ebp - 0x60]
push edx
call ebx
mov ebx, dword [ebp - 0x60]
test eax, eax
je 0x45f161
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x45f161
push ebx
push str.deleteFile__s__Fail_
call fcn.0045f340
push eax
call fcn.0042d870
add esp, 0xc
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x45f1ab
push ebx
push esi
push str.moveFile__s__s__Fail_
call fcn.0045f340
push eax
call fcn.0042d870
add esp, 0x10
jmp 0x45f1ab
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x28], edi
jae 0x45f18f
lea eax, [ebp - 0x3c]
push eax
push str.GetDnsIPList__s__Fail
call fcn.0045f340
push eax
call fcn.0042d870
add esp, 0xc
jmp 0x45efb2
mov ebx, dword [ebp - 0x60]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x45f1da
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push str.Update_Gatewayserver.dat_Succ_
call fcn.0045f340
push eax
call fcn.0042d870
add esp, 8
jmp 0x45f1ef
push esi
push edi
push str.moveFile__s__s__Fail_
call fcn.0045f340
push eax
call fcn.0042d870
add esp, 0x10
lea eax, [ebx - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45f20b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0xfffffff0
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45f227
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
xor esi, esi
lea ecx, [ebp - 0x50]
call fcn.0043bbf0
add edi, 0xfffffff0
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45f24d
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
cmp dword [ebp - 0x28], 8
jb 0x45f25f
mov eax, dword [ebp - 0x3c]
push eax
call fcn.004fe49e
add esp, 4
xor ecx, ecx
cmp dword [ebp - 0xc], 0x10
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], esi
mov word [ebp - 0x3c], cx
jb 0x45f281
mov edx, dword [ebp - 0x20]
push edx
call fcn.004fe49e
add esp, 4
mov eax, dword [ebp - 0x74]
mov byte [ebp - 0x20], 0
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], 0xf
cmp eax, esi
je 0x45f29f
push eax
call fcn.004fe49e
add esp, 4
lea ecx, [ebp - 0x59]
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x6c], esi
call sub.WS2_32.dll_WSACleanup
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00500397
mov esp, ebp
pop ebp
ret
push str.GatewayServer_Fail_Count0__
call fcn.0045f340
push eax
call fcn.0042d870
add esp, 8
jmp 0x45f229
call fcn.0045f340
mov eax, dword [eax + 0x10b8]
push eax
push str.DownloadUrl__s__Fail_
call fcn.0045f340
push eax
call fcn.0042d870
add esp, 0xc
jmp 0x45f229