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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49f2fc
mov eax, dword fs:[0]
push eax
sub esp, 0xc3c
mov eax, dword [0x4c9890]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push eax
mov byte [ebp - 0xc41], 0
mov byte [ebp - 0xc42], 0
mov byte [ebp - 0xc43], 0
call fcn.004866f0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0xa38], ax
lea eax, [ebp - 0xa36]
push eax
call fcn.004866f0
add esp, 0x18
lea eax, [edi + 0x47ba]
push eax
push 0x104
lea eax, [ebp - 0xa38]
push eax
push 0x4a1b98
push str.SavePath
push str.Downloader
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0xa38]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x415850
sub ecx, edx
sar ecx, 1
je 0x415891
push 0x103
lea eax, [ebp - 0xa38]
push eax
lea eax, [edi + 0x3982]
push 0x104
push eax
mov byte [ebp - 0xc41], 1
call fcn.00486548
add esp, 0x10
xor eax, eax
mov word [edi + 0x3b88], ax
cmp dword [edi + 0xd568], 0
jne 0x4158cd
push 0x2c
call fcn.004867f5
add esp, 4
mov dword [ebp - 0xc48], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x4158be
mov ecx, eax
call fcn.00411100
jmp 0x4158c0
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 0xd568], eax
mov ecx, edi
mov dword [edi + 0xd538], 0x80004005
call fcn.0041cf80
mov esi, dword [edi + 0xd568]
test esi, esi
je 0x415902
mov ecx, esi
call fcn.00411150
push esi
call fcn.00486409
add esp, 4
mov dword [edi + 0xd568], 0
cmp dword [edi + 0xd538], 0
jl 0x415b5a
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.004866f0
add esp, 0xc
cmp dword [edi + 0xd594], 0
jne 0x415969
push 0x2c
call fcn.004867f5
add esp, 4
mov dword [ebp - 0xc48], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x41595a
mov ecx, eax
call fcn.00411100
jmp 0x41595c
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 0xd594], eax
lea eax, [ebp - 0x218]
push eax
push 0
lea ebx, [edi + 0x8b0]
push ebx
mov ecx, edi
call fcn.00419910
mov esi, dword [edi + 0xd594]
test esi, esi
je 0x4159a4
mov ecx, esi
call fcn.00411150
push esi
call fcn.00486409
add esp, 4
mov dword [edi + 0xd594], 0
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4159b0
sub ecx, edx
sar ecx, 1
je 0x415a00
cmp word [ebp + ecx*2 - 0x21a], 0x22
jne 0x4159e1
dec ecx
lea eax, [ecx + ecx]
cmp eax, 0x208
jae 0x4159fb
xor edx, edx
mov word [ebp + eax - 0x218], dx
test ecx, ecx
je 0x415a00
cmp word [ebp - 0x218], 0x22
jne 0x415a00
lea eax, [ecx - 1]
push eax
lea eax, [ebp - 0x216]
jmp 0x415a07
call fcn.0048697a
push ecx
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push 0x104
push eax
call fcn.00486548
add esp, 0x10
cmp byte [ebp - 0xc41], 0
je 0x415b5a
mov esi, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push ebx
call esi
mov ebx, eax
lea eax, [edi + 0x3982]
push eax
call esi
lea ecx, [ecx]
mov cx, word [eax]
cmp cx, word [ebx]
jne 0x415a66
test cx, cx
je 0x415a62
mov cx, word [eax + 2]
cmp cx, word [ebx + 2]
jne 0x415a66
add eax, 4
add ebx, 4
test cx, cx
jne 0x415a40
xor eax, eax
jmp 0x415a6b
sbb eax, eax
or eax, 1
test eax, eax
je 0x415a94
push 0x208c
mov byte [ebp - 0xc43], 1
call fcn.0048614e
mov esi, eax
lea eax, [edi + 0x8b0]
push eax
lea eax, [edi + 0x3982]
jmp 0x415b35
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x830], ax
lea eax, [ebp - 0x82e]
push eax
call fcn.004866f0
add esp, 0xc
lea eax, [edi + 0x47ba]
push eax
push 0x104
lea eax, [ebp - 0x830]
push eax
push 0x4a1b98
push str.ETag
push str.Downloader
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0x420]
lea eax, [ebp - 0x830]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x415b0c
test dx, dx
je 0x415b08
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x415b0c
add eax, 4
add ecx, 4
test dx, dx
jne 0x415ae6
xor eax, eax
jmp 0x415b11
sbb eax, eax
or eax, 1
test eax, eax
je 0x415b5a
push 0x208c
mov byte [ebp - 0xc43], 1
call fcn.0048614e
mov esi, eax
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x830]
push eax
push str.BuildChaned_:_Local__s____Server__s_
push 0x1045
push 0x1046
push esi
call fcn.00486606
push esi
call fcn.004010d0
push esi
call fcn.004866e2
add esp, 0x24
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x628], ax
lea eax, [ebp - 0x626]
push eax
call fcn.004866f0
mov al, byte [ebp - 0xc41]
add esp, 0xc
test al, al
je 0x415c48
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea esi, [edi + 0x3982]
push esi
call ebx
test eax, eax
je 0x415ba4
push 0x103
push esi
jmp 0x415c1e
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.004866f0
push 0x103
push esi
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00486548
xor eax, eax
add esp, 0x1c
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
push str..tmp
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.004892e8
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
call ebx
test eax, eax
je 0x415c42
push 0x103
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x628]
push 0x104
push eax
mov byte [ebp - 0xc42], 1
call fcn.00486548
add esp, 0x10
xor eax, eax
mov word [ebp - 0x422], ax
mov al, byte [ebp - 0xc41]
cmp byte [ebp - 0xc43], 0
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
je 0x415c80
movzx eax, byte [edi + 0xd532]
push eax
push 4
mov ecx, edi
call fcn.0041fe00
cmp byte [ebp - 0xc42], 0
je 0x415ca9
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x415ca9
test al, al
je 0x415dfb
cmp byte [ebp - 0xc42], 0
jne 0x415e53
mov al, byte [edi + 0xd532]
test al, al
je 0x415cf3
push eax
push 5
mov ecx, edi
call fcn.0041fe00
lea esi, [edi + 0x49c2]
push esi
call fcn.004124e0
push esi
push str._CheckBuildStatus__Generate_New_TokenID_:__s
call fcn.00413860
add esp, 0xc
mov ecx, edi
mov byte [edi + 0xd52e], 1
mov byte [edi + 0xd533], 1
mov byte [edi + 0xd535], 0
call fcn.00420300
lea eax, [edi + 0x47ba]
push eax
push esi
push str.TokenID
push str.Downloader
call ebx
push 0x4a1b98
lea esi, [edi + 0x3982]
push 0x104
push esi
call fcn.00488884
add esp, 0xc
lea eax, [edi + 0x47ba]
push eax
push esi
push str.SavePath
push str.Downloader
call ebx
lea ecx, [ebp - 0x420]
mov eax, 0x4a1b98
jmp 0x415d30
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x415d56
test dx, dx
je 0x415d52
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x415d56
add eax, 4
add ecx, 4
test dx, dx
jne 0x415d30
xor eax, eax
jmp 0x415d5b
sbb eax, eax
or eax, 1
test eax, eax
je 0x415d79
lea eax, [edi + 0x47ba]
push eax
lea eax, [ebp - 0x420]
push eax
push str.ETag
push str.Downloader
call ebx
xor eax, eax
push 0x206
push eax
mov word [ebp - 0xc40], ax
lea eax, [ebp - 0xc3e]
push eax
mov byte [edi + 0xd532], 0
mov byte [edi + 0xd530], 1
mov dword [edi + 0xd540], 0
mov dword [edi + 0xd544], 0
call fcn.004866f0
push 0
push 0x4a62b0
lea eax, [ebp - 0xc40]
push 0x103
push eax
call fcn.00401690
add esp, 0x1c
lea eax, [edi + 0x47ba]
push eax
lea eax, [ebp - 0xc40]
push eax
push str.Completed
push str.Downloader
call ebx
mov ecx, edi
call fcn.0041ce60
mov ecx, edi
call fcn.00419ef0
jmp 0x415e53
lea ecx, [ebp - 0x420]
mov eax, 0x4a1b98
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x415e2c
test dx, dx
je 0x415e28
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x415e2c
add eax, 4
add ecx, 4
test dx, dx
jne 0x415e06
xor eax, eax
jmp 0x415e31
sbb eax, eax
or eax, 1
test eax, eax
je 0x415e53
lea eax, [edi + 0x47ba]
push eax
lea eax, [ebp - 0x420]
push eax
push str.ETag
push str.Downloader
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push str.CheckBuildStatus___Done_
call fcn.004010d0
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00487c50
mov esp, ebp
pop ebp
ret