Function at 0x407860
Capabilities:
Access peb ldr_data
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x41c8e6
mov eax, dword fs:[0]
push eax
sub esp, 0x288
mov eax, dword [0x423044]
xor eax, esp
mov dword [esp + 0x284], eax
push ebp
push esi
push edi
mov eax, dword [0x423044]
xor eax, esp
push eax
lea eax, [esp + 0x298]
mov dword fs:[0], eax
mov eax, dword [0x424614]
mov esi, ecx
mov edi, edx
mov edx, dword [eax + 0xc]
xor ebp, ebp
mov ecx, 0x424614
mov dword [esp + 0x14], esi
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x24], ebp
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2a0], ebp
mov eax, dword [0x424614]
mov edx, dword [eax + 0xc]
mov ecx, 0x424614
call edx
lea ebp, [eax + 0x10]
mov dword [esp + 0x20], ebp
push 0x103
lea eax, [esp + 0x39]
push 0
mov byte [esp + 0x2a8], 1
push eax
mov byte [esp + 0x40], 0
call fcn.0040d460
add esp, 0xc
push 0x158
lea ecx, [esp + 0x13c]
push 0
push ecx
call fcn.0040d460
mov dword [ebx + 0xc], 0
add esp, 0xc
mov dword [edi], 0
mov edi, str.ReplaceNowFileList
mov ecx, 0x13
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x407950
mov esi, dword [esp + 0x14]
xor eax, eax
mov edi, str.CompareReplaceFileList
mov ecx, 0x17
repe cmpsb byte [esi], byte es:[edi]
mov byte [esp + 0x13], al
jne 0x407955
mov byte [esp + 0x13], 1
mov eax, dword [ebx + 0x28]
mov ecx, dword [esp + 0x14]
push eax
push 0
push str.Count
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], 0
jbe 0x407b0b
cmp byte [0x425490], 0
jne 0x407b0b
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [esp + 0x18]
push edx
push str.File
push str._s_d
lea edi, [esp + 0x28]
call fcn.00409fe0
mov eax, dword [ebp - 8]
mov esi, dword [ebx + 0x28]
mov ecx, 1
sub ecx, dword [ebp - 4]
sub eax, 0x104
add esp, 0xc
or eax, ecx
jge 0x4079d8
mov ecx, 0x104
lea eax, [esp + 0x20]
call fcn.004095e0
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
push esi
push 0x104
push ebp
push 0x420158
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test ebp, ebp
jne 0x4079fc
xor ecx, ecx
jmp 0x407a12
mov ecx, ebp
lea esi, [ecx + 1]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x407a01
sub ecx, esi
js 0x407b12
cmp ecx, dword [ebp - 8]
jg 0x407b12
cmp eax, 0x104
mov dword [ebp - 0xc], ecx
mov byte [ecx + ebp], 0
jae 0x407b1c
cmp dword [ebp - 0xc], 0
je 0x407b1c
mov eax, dword [ebx + 0x24]
push eax
push ebp
call fcn.0040c9f9
add esp, 8
test eax, eax
je 0x407af6
push str.index.dat
push ebp
call fcn.0040c9f9
add esp, 8
test eax, eax
je 0x407af6
push str.ver.dat
push ebp
call fcn.0040c9f9
add esp, 8
test eax, eax
je 0x407af6
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x38]
push eax
mov edx, ebp
mov ecx, ebx
call fcn.00407320
test eax, eax
je 0x407af6
cmp dword [esp + 0x24], 0
je 0x407af6
push 0xa
lea ecx, [esp + 0x13c]
push 0
push ecx
call fcn.0040cf3a
mov ecx, dword [esp + 0x3c]
add dword [ecx], eax
add esp, 0xc
lea esi, [ebx + 0x40]
lea eax, [esp + 0x34]
call fcn.00408930
push str.KWSReUpd.exe
push ebp
call fcn.0040c9f9
add esp, 8
test eax, eax
jne 0x407ae3
lea esi, [ebx + 0x50]
lea eax, [esp + 0x34]
call fcn.00408930
mov dword [ebx + 0xc], 1
jmp 0x407af6
cmp byte [esp + 0x13], 0
je 0x407af6
lea esi, [ebx + 0x50]
lea eax, [esp + 0x34]
call fcn.00408930
mov eax, dword [esp + 0x18]
add eax, 1
cmp eax, dword [esp + 0x28]
mov dword [esp + 0x18], eax
jb 0x40797f
mov esi, 1
jmp 0x407b20
push 0x80070057
call fcn.004045b0
mov esi, dword [esp + 0x2c]
add ebp, 0xfffffff0
mov byte [esp + 0x2a0], 0
lea edx, [ebp + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x407b45
mov ecx, dword [ebp]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebp
call eax
mov dword [esp + 0x2a0], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407b70
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x298]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x284]
xor ecx, esp
call fcn.0040af86
add esp, 0x294
ret