Function at 0x487970
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x574656
mov eax, dword fs:[0]
push eax
sub esp, 0x634
mov eax, dword [0x5d7c7c]
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 ebx, dword [ebp + 8]
mov dword [ebp - 0x634], ebx
test ebx, ebx
je 0x487c8e
push ebx
lea ecx, [ebp - 0x640]
call fcn.0040e0d0
push 0x500000
mov dword [ebp - 4], 0
call fcn.004ad458
push 0x500000
push 0
push eax
mov dword [ebp - 0x638], eax
call fcn.005126f0
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.005126f0
push 0x208
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.005126f0
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.005126f0
add esp, 0x34
lea ecx, [ebp - 0x62c]
push ebx
call fcn.0040e0d0
mov eax, dword [ebp - 0x62c]
mov ebx, str.updatecfg.ini
sub ebx, eax
mov byte [ebp - 4], 1
push 0xe
push str.updatecfg.ini
mov edi, dword [eax - 0xc]
sar ebx, 1
call fcn.0053e8c0
mov ecx, SysReAllocString
mov dword [ebp - 0x630], eax
sub ecx, eax
add esp, 8
cmp ecx, edi
jl 0x487caf
lea esi, [edi + eax]
test esi, esi
js 0x487cb9
mov eax, dword [ebp - 0x62c]
mov edx, 1
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x487a95
push esi
lea ecx, [ebp - 0x62c]
call fcn.0040b250
mov eax, dword [ebp - 0x62c]
lea edx, [eax + ebx*2]
cmp ebx, edi
jbe 0x487aa1
mov edx, str.updatecfg.ini
mov ecx, dword [ebp - 0x630]
lea eax, [eax + edi*2]
push ecx
push edx
push ecx
push eax
call fcn.0040c6b0
mov eax, dword [ebp - 0x62c]
add esp, 0x10
cmp esi, dword [eax - 8]
jg 0x487caf
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [ebp - 0x62c]
mov word [eax + esi*2], cx
push dword [ebp - 0x62c]
push 0x280000
push dword [ebp - 0x638]
push ecx
push ecx
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor esi, esi
mov dword [ebp - 0x63c], eax
xor ebx, ebx
mov dword [ebp - 0x630], esi
test eax, eax
je 0x487c3a
mov edi, dword [ebp - 0x634]
nop dword [eax]
mov eax, dword [ebp - 0x638]
movzx eax, word [eax + esi*2]
test ax, ax
jne 0x487c1e
lea eax, [ebx + ebx]
cmp eax, 0x208
jae 0x487caa
push dword [ebp - 0x62c]
xor ecx, ecx
xor ebx, ebx
push 0x104
mov word [ebp + eax - 0x420], cx
lea eax, [ebp - 0x628]
push eax
push ebx
push str.path
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
cmp word [ebp - 0x628], bx
je 0x487c27
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x487b74
sub eax, edx
sar eax, 1
and eax, 0x7fffffff
cmp eax, 0x7ffffffe
jbe 0x487b9a
xor eax, eax
mov word [ebp - 0x218], ax
jmp 0x487be9
mov esi, dword [ebp - 0x634]
lea ecx, [ebp - 0x218]
lea edi, [eax - 0x82]
mov edx, 0x82
mov eax, ecx
sub esi, eax
lea eax, [edi + edx]
test eax, eax
je 0x487bd0
movzx eax, word [esi + ecx]
test ax, ax
je 0x487bd0
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x487bb5
mov esi, dword [ebp - 0x630]
lea eax, [ecx - 2]
mov edi, dword [ebp - 0x634]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [ebp - 0x62c]
lea eax, [ebp - 0x218]
push eax
push str.path
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x487c27
mov word [ebp + ebx*2 - 0x420], ax
inc ebx
inc esi
mov dword [ebp - 0x630], esi
cmp esi, dword [ebp - 0x63c]
jb 0x487b10
push dword [ebp - 0x638]
call fcn.004ad5a8
mov edx, dword [ebp - 0x62c]
or esi, 0xffffffff
add esp, 4
mov byte [ebp - 4], 0
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x487c6c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x640]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x487c8e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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.004acb08
mov esp, ebp
pop ebp
ret
call fcn.004ad1fa
push 0x80070057
call fcn.0040ae00
push 0x80070057
call fcn.0040ae00
int3