Function at 0x402880
Capabilities:
Check if file exists
Create process on windows
Get common file path
Get file size
Read .ini file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x258c
call fcn.0040e190
mov eax, dword [0x41501c]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x255c], ecx
mov dword [ebp - 4], 0
jmp 0x4028af
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 5
jge 0x402e11
xor ecx, ecx
mov word [ebp - 0x1cf8], cx
push 0x206
push 0
lea edx, [ebp - 0x1cf6]
push edx
call fcn.00405360
add esp, 0xc
lea eax, [ebp - 0x1cf8]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.kgmbxupdate.ini
push 0x104
lea ecx, [ebp - 0x1cf8]
push ecx
call fcn.00404235
add esp, 0xc
lea edx, [ebp - 0x1cf8]
push edx
push str.http:__wdl1.cache.wps.cn_kgb_update_updateinfo.ini
mov ecx, dword [ebp - 0x255c]
call fcn.00403110
test eax, eax
jne 0x402920
jmp 0x4028a6
xor eax, eax
mov word [ebp - 0x1258], ax
push 0x7fe
push 0
lea ecx, [ebp - 0x1256]
push ecx
call fcn.00405360
add esp, 0xc
xor edx, edx
mov word [ebp - 0x2550], dx
push 0x7fe
push 0
lea eax, [ebp - 0x254e]
push eax
call fcn.00405360
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0xa58], cx
push 0x7fe
push 0
lea edx, [ebp - 0xa56]
push edx
call fcn.00405360
add esp, 0xc
xor eax, eax
mov word [ebp - 0x1ae8], ax
push 0x80
push 0
lea ecx, [ebp - 0x1ae6]
push ecx
call fcn.00405360
add esp, 0xc
xor edx, edx
mov word [ebp - 0x1d48], dx
push 0x40
push 0
lea eax, [ebp - 0x1d46]
push eax
call fcn.00405360
add esp, 0xc
lea ecx, [ebp - 0x1cf8]
push ecx
push 0x400
lea edx, [ebp - 0x1258]
push edx
push 0x4132f0
push str.version
push 0x413308
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x1cf8]
push eax
push 0x400
lea ecx, [ebp - 0x2550]
push ecx
push 0x413318
push str.dist
push 0x41332c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [ebp - 0x1cf8]
push edx
push 0x400
lea eax, [ebp - 0xa58]
push eax
push 0x41333c
push 0x413340
push 0x413348
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0x1cf8]
push ecx
push 0x41
lea edx, [ebp - 0x1ae8]
push edx
push 0x413358
push str.size
push 0x413368
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x1cf8]
push eax
push 0x21
lea ecx, [ebp - 0x1d48]
push ecx
push 0x413378
push 0x41337c
push str.update
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [ebp - 0xa58]
mov dword [ebp - 0x2560], edx
mov eax, dword [ebp - 0x2560]
add eax, 2
mov dword [ebp - 0x2564], eax
mov ecx, dword [ebp - 0x2560]
mov dx, word [ecx]
mov word [ebp - 0x2566], dx
add dword [ebp - 0x2560], 2
cmp word [ebp - 0x2566], 0
jne 0x402a95
mov eax, dword [ebp - 0x2560]
sub eax, dword [ebp - 0x2564]
sar eax, 1
mov dword [ebp - 0x256c], eax
je 0x402b74
lea ecx, [ebp - 0x1ae8]
mov dword [ebp - 0x2570], ecx
mov edx, dword [ebp - 0x2570]
add edx, 2
mov dword [ebp - 0x2574], edx
mov eax, dword [ebp - 0x2570]
mov cx, word [eax]
mov word [ebp - 0x2576], cx
add dword [ebp - 0x2570], 2
cmp word [ebp - 0x2576], 0
jne 0x402aeb
mov edx, dword [ebp - 0x2570]
sub edx, dword [ebp - 0x2574]
sar edx, 1
mov dword [ebp - 0x257c], edx
je 0x402b74
lea eax, [ebp - 0x1d48]
mov dword [ebp - 0x2580], eax
mov ecx, dword [ebp - 0x2580]
add ecx, 2
mov dword [ebp - 0x2584], ecx
mov edx, dword [ebp - 0x2580]
mov ax, word [edx]
mov word [ebp - 0x2586], ax
add dword [ebp - 0x2580], 2
cmp word [ebp - 0x2586], 0
jne 0x402b3d
mov ecx, dword [ebp - 0x2580]
sub ecx, dword [ebp - 0x2584]
sar ecx, 1
mov dword [ebp - 0x258c], ecx
jne 0x402b79
jmp 0x4028a6
lea edx, [ebp - 0x1258]
push edx
mov ecx, dword [ebp - 0x255c]
call fcn.00403320
test eax, eax
jne 0x402b96
xor eax, eax
jmp 0x402e16
lea eax, [ebp - 0x2550]
push eax
mov ecx, dword [ebp - 0x255c]
call fcn.00403620
test eax, eax
jne 0x402bb3
xor eax, eax
jmp 0x402e16
mov dword [ebp - 0x1a5c], 0
xor ecx, ecx
mov word [ebp - 0x210], cx
push 0x206
push 0
lea edx, [ebp - 0x20e]
push edx
call fcn.00405360
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.kgmbxupdate.exe
push 0x104
lea ecx, [ebp - 0x210]
push ecx
call fcn.00404235
add esp, 0xc
lea edx, [ebp - 0x210]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x402c1e
cmp dword [ebp - 4], 0
jle 0x402c4f
mov dword [ebp - 0x1a5c], 1
call fcn.004015c0
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0xa58]
push ecx
mov ecx, dword [ebp - 0x255c]
call fcn.00403110
test eax, eax
jne 0x402c4f
jmp 0x4028a6
lea edx, [ebp - 0x1ae8]
push edx
call fcn.004049fd
add esp, 4
mov dword [ebp - 0x2558], eax
mov dword [ebp - 0x2554], edx
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1aec], eax
cmp dword [ebp - 0x1aec], 0xffffffff
jne 0x402c9a
jmp 0x4028a6
mov dword [ebp - 0x1d00], 0
xor ecx, ecx
mov dword [ebp - 0x1cfc], ecx
lea edx, [ebp - 0x1d00]
push edx
mov eax, dword [ebp - 0x1aec]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x402ce0
mov ecx, dword [ebp - 0x1d00]
cmp ecx, dword [ebp - 0x2558]
jne 0x402ce0
mov edx, dword [ebp - 0x1cfc]
cmp edx, dword [ebp - 0x2554]
je 0x402cf2
mov eax, dword [ebp - 0x1aec]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4028a6
mov ecx, dword [ebp - 0x1aec]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov word [ebp - 0x258], dx
push 0x40
push 0
lea eax, [ebp - 0x256]
push eax
call fcn.00405360
add esp, 0xc
push 0x21
lea ecx, [ebp - 0x258]
push ecx
lea edx, [ebp - 0x210]
push edx
call fcn.00401130
add esp, 0xc
test eax, eax
je 0x402d51
lea eax, [ebp - 0x1d48]
push eax
lea ecx, [ebp - 0x258]
push ecx
call fcn.0040463f
add esp, 8
test eax, eax
je 0x402d56
jmp 0x4028a6
cmp dword [ebp - 0x1a5c], 0
je 0x402d64
call fcn.00401790
mov ecx, dword [ebp - 0x255c]
call fcn.00403c40
test eax, eax
je 0x402d80
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402d64
xor edx, edx
mov word [ebp - 0x1a58], dx
push 0x7fe
push 0
lea eax, [ebp - 0x1a56]
push eax
call fcn.00405360
add esp, 0xc
push 0x416ed0
push str._update__from_s
push 0x400
lea ecx, [ebp - 0x1a58]
push ecx
call fcn.00404217
add esp, 0x10
push 1
push 0
lea edx, [ebp - 0x1a58]
push edx
lea eax, [ebp - 0x210]
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov dword [ebp - 0x1d4c], eax
cmp dword [ebp - 0x1d4c], 5
jne 0x402dfc
push 0x48
mov ecx, dword [ebp - 0x255c]
call fcn.00403e70
jmp 0x402e11
cmp dword [ebp - 0x1d4c], 0x20
jg 0x402e0a
jmp 0x4028a6
jmp 0x402e11
mov eax, 1
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040418f
mov esp, ebp
pop ebp
ret