Function at 0x40791e
Capabilities:
Access peb ldr_data
Check for time delay via gettickcount
Delete file
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4868ea
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x4b2068]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov eax, dword [0x4b457c]
mov esi, 0x4b457c
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
and dword [esp + 0x30], 0
mov eax, dword [0x4b457c]
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x30], 1
mov eax, dword [0x4b457c]
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x1c], eax
push dword [ebp + 8]
lea eax, [esp + 0x1c]
push eax
mov byte [esp + 0x38], 2
call fcn.00402394
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
push eax
lea eax, [esp + 0x20]
push str._cid_d
push eax
call fcn.00404e7f
mov eax, dword [esp + 0x28]
add esp, 0xc
push dword [eax - 0xc]
push eax
lea eax, [esp + 0x20]
call fcn.0040217c
mov ebx, dword [ebp + 0x10]
push ebx
push dword [ebp + 8]
mov esi, 0x4b4d74
push str.KHelper::DownloadFileAndDecompress_url:_ws_file:_ws
call fcn.00411a60
add esp, 0xc
cmp dword [ebp + 0x14], 0
je 0x407a31
push 0
push ebx
call dword [sym.imp.MSVCR80.dll__waccess]
test eax, eax
pop ecx
pop ecx
jne 0x407a31
push 0x5c
push ebx
call dword [sym.imp.MSVCR80.dll_wcsrchr]
inc eax
lea ecx, [esp + 0x1c]
push ecx
inc eax
push ebx
mov ecx, eax
call fcn.00406958
add esp, 0x10
test eax, eax
je 0x407a31
push dword [ebp + 0x14]
push dword [esp + 0x18]
call dword [sym.imp.MSVCR80.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x407a31
xor ebx, ebx
jmp 0x407b6a
call edi
and dword [esp + 0x10], 0
mov dword [esp + 0x20], eax
mov ebx, dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [esp + 0x10], 3
jge 0x407a9e
push 0
push ebx
push dword [ebp + 8]
call fcn.00407314
add esp, 0xc
test eax, eax
jne 0x407ad8
call edi
push dword [ebp + 0x10]
mov ebx, eax
sub ebx, dword [esp + 0x24]
xor ecx, ecx
call fcn.004036eb
push dword [ebp + 0xc]
push dword [ebp + 0x10]
call fcn.00407902
xor ebx, ebx
cmp eax, ebx
pop ecx
pop ecx
jne 0x407adc
push 4
pop ebx
push dword [ebp + 0x10]
push 0
push str.Decompress_return:_d__path:_ws
call fcn.00411a60
add esp, 0xc
jmp 0x407b40
cmp dword [esp + 0x10], 5
jge 0x407ab2
push 0
push ebx
push dword [ebp + 8]
call fcn.0040742e
jmp 0x407ad1
cmp dword [esp + 0x10], 6
jge 0x407ac5
mov ecx, dword [ebp + 8]
mov edx, ebx
call fcn.00407594
jmp 0x407ad4
push 0
push ebx
push dword [esp + 0x20]
call fcn.00407314
add esp, 0xc
test eax, eax
je 0x407a71
push 7
jmp 0x407b3f
cmp dword [ebp + 0x14], ebx
je 0x407b4f
push 0x5c
push dword [ebp + 0x10]
call dword [sym.imp.MSVCR80.dll_wcsrchr]
lea ecx, [esp + 0x1c]
inc eax
push ecx
push dword [ebp + 0x10]
inc eax
mov ecx, eax
call fcn.00406958
add esp, 0x10
cmp eax, ebx
jne 0x407b16
push 5
pop ebx
push dword [ebp + 0x10]
push 0
push str.GetFileMd5_return:_d__path:_ws
jmp 0x407a91
push dword [ebp + 0x14]
push dword [esp + 0x18]
call dword [sym.imp.MSVCR80.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
je 0x407b4f
push dword [esp + 0x14]
push dword [ebp + 0x14]
push str.Compare_md5_not_matched__expected:_ws__actually:_ws
call fcn.00411a60
add esp, 0xc
push 6
pop ebx
inc dword [esp + 0x10]
cmp dword [esp + 0x10], 7
jl 0x407a3c
push dword [ebp + 0x10]
push dword [ebp + 8]
call edi
sub eax, dword [esp + 0x28]
push eax
push ebx
push str.DownloadFileAndDecompress_return:_d__cost_time:_d__url:_ws__path:_ws
call fcn.00411a60
add esp, 0x14
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
call fcn.0040214e
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
call fcn.0040214e
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
call fcn.0040214e
mov eax, ebx
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret