Function at 0x4046e0
Capabilities:
Check if file exists
Create directory
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43926c
mov eax, dword fs:[0]
push eax
sub esp, 0x1ac
mov eax, dword [0x449260]
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
xor ebx, ebx
mov dword [ebp - 0x158], ebx
mov dword [ebp - 0x154], ebx
mov dword [ebp - 0x150], ebx
mov dword [ebp - 0x148], ebx
mov dword [ebp - 0x144], ebx
mov dword [ebp - 0x140], ebx
lea eax, [ebp - 0xf0]
push eax
mov ecx, str.league_of_legends.exe
mov dword [ebp - 4], ebx
call fcn.00405910
mov byte [ebp - 4], 1
mov edx, dword [0x4491b4]
mov eax, dword [edx + 0xc]
mov ecx, 0x4491b4
call eax
add eax, 0x10
mov dword [ebp - 0xf4], eax
lea ecx, [ebp - 0xec]
push ecx
mov byte [ebp - 4], 2
mov byte [ebp - 0xd9], bl
call fcn.0041d740
add esp, 4
push eax
lea edx, [ebp - 0xe0]
push edx
mov ebx, str.patch_
mov byte [ebp - 4], 3
call fcn.00405e20
add esp, 8
mov esi, eax
mov byte [ebp - 4], 4
cmp dword [0x44c128], 0x10
mov eax, dword [0x44c114]
jae 0x4047b0
mov eax, 0x44c114
push eax
lea edi, [ebp - 0x158]
call fcn.004112d0
lea ecx, [ebp - 0xe4]
push esi
push ecx
mov ebx, eax
call fcn.00405e20
push eax
lea edx, [ebp - 0xd8]
push edx
mov ebx, 0x43fdc8
mov byte [ebp - 4], 5
call fcn.00405e20
add esp, 0x10
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0xe4]
add eax, 0xfffffff0
or edi, 0xffffffff
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40480c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0xe0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404831
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0xec]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404856
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [0x44c124], 0
jne 0x4048e8
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0xd8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404888
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xf4]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4048ad
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xf0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4048d2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x158]
push ecx
mov dword [ebp - 4], edi
call fcn.00401aa0
xor al, al
jmp 0x4051da
lea edx, [ebp - 0xf0]
push edx
lea eax, [ebp - 0xe8]
push eax
lea ebx, [ebp - 0xd8]
call fcn.00405d70
mov eax, dword [eax]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, edi
mov eax, dword [ebp - 0xe8]
setne byte [ebp - 0xda]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404937
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ebx, ebx
cmp byte [ebp - 0xda], bl
je 0x4049ee
mov eax, dword [ebp - 0xd8]
mov ecx, eax
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x404950
sub ecx, esi
sar ecx, 1
push ecx
mov ecx, 0x44c0dc
call fcn.00401700
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0xd8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40498f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xf4]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4049b4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0xf0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4049d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x158]
push ecx
mov dword [ebp - 4], edi
call fcn.00401aa0
mov al, 1
jmp 0x4051da
push 0x25
push str.http:__lol.mkjogo.com_top_verlist.txt
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
call fcn.00411800
push 0x3c
lea edx, [ebp - 0x1a8]
push ebx
push edx
mov dword [ebp - method.CDMHttp.virtual_0], vtable.CDMHttp.0
mov dword [ebp - 0x1b4], ebx
mov dword [ebp - 0x1b0], ebx
mov dword [ebp - 0x1ac], ebx
call fcn.00427c90
add esp, 0xc
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x2c]
mov esi, 0x10
cmp dword [ebp - 0x18], esi
jae 0x404a4c
lea eax, [ebp - 0x2c]
push eax
lea edi, [ebp - 0x158]
call fcn.004112d0
push ebx
push ebx
push ebx
mov edx, eax
lea ecx, [ebp - 0x1b8]
call fcn.004128c0
push 0x88
mov edi, eax
push str.__0_9.____projects_lol_game_client_releases___0_9.___files_League_of_Legends.exe.compressed___A_Za_z0_9______0_9_____0_9_____0_9__
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x134], edi
mov dword [ebp - 0x50], 0xf
mov dword [ebp - 0x54], ebx
mov byte [ebp - 0x64], bl
call fcn.00411800
mov dword [ebp - 0x12c], ebx
mov dword [ebp - 0x128], ebx
mov dword [ebp - 0x124], ebx
mov dword [ebp - 0x11c], ebx
mov dword [ebp - 0x118], ebx
mov byte [ebp - 0x114], bl
mov dword [ebp - 0x110], ebx
mov dword [ebp - 0x10c], ebx
mov byte [ebp - 0x108], bl
mov dword [ebp - 0x104], ebx
mov dword [ebp - 0x100], ebx
mov byte [ebp - 0xfc], bl
mov byte [ebp - 4], 0xd
mov ebx, dword [ebp - 0x64]
cmp dword [ebp - 0x50], esi
jae 0x404ae6
lea ebx, [ebp - 0x64]
lea eax, [ebp - 0x168]
push eax
call fcn.00406150
push 0x442d0c
push edi
call fcn.004221b6
add esp, 8
mov dword [ebp - 0x6c], 0xf
mov dword [ebp - 0x70], 0
mov byte [ebp - 0x80], 0
mov byte [ebp - 4], 0xf
test eax, eax
je 0x405053
mov edi, edi
mov ecx, eax
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x404b25
sub ecx, esi
push eax
lea edx, [ebp - 0x130]
add ecx, eax
push edx
push ecx
lea ecx, [ebp - 0x168]
mov edx, eax
call fcn.0040ae50
add esp, 0xc
test al, al
je 0x404fcd
mov ecx, dword [ebp - 0x128]
mov esi, dword [ebp - 0x12c]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
lea eax, [ebp - 0x104]
jbe 0x404b7d
lea eax, [esi + 0xc]
push eax
mov esi, 0x44c114
call fcn.00409ab0
add esp, 4
test al, al
je 0x404fcd
mov ecx, dword [ebp - 0x128]
mov esi, dword [ebp - 0x12c]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
lea eax, [ebp - 0x104]
cmp ecx, 2
jbe 0x404bbf
lea eax, [esi + 0x18]
lea esi, [ebp - 0x48]
call fcn.00406020
push 0xffffffffffffffff
push 0
mov edx, esi
mov ebx, 0x10
push edx
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], bl
call fcn.004114a0
mov byte [ebp - 4], 0xf
cmp dword [ebp - 0x34], ebx
jb 0x404bf3
mov eax, dword [ebp - 0x48]
push eax
call fcn.00420fa6
add esp, 4
mov ecx, dword [ebp - 0x128]
mov esi, dword [ebp - 0x12c]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
lea eax, [ebp - 0x104]
cmp ecx, 4
jbe 0x404c1f
lea eax, [esi + 0x30]
push eax
lea ecx, [ebp - 0x48]
call fcn.00406040
cmp dword [eax + 0x14], ebx
jb 0x404c2f
mov eax, dword [eax]
push eax
call fcn.00422124
add esp, 4
mov dword [ebp - 0xe4], eax
cmp dword [ebp - 0x34], ebx
jb 0x404c4f
mov edx, dword [ebp - 0x48]
push edx
call fcn.00420fa6
add esp, 4
mov ecx, dword [ebp - 0x128]
mov esi, dword [ebp - 0x12c]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 5
lea eax, [ebp - 0x104]
jbe 0x404c7b
lea eax, [esi + 0x3c]
push eax
lea ecx, [ebp - 0x48]
call fcn.00406040
cmp dword [eax + 0x14], ebx
jb 0x404c8b
mov eax, dword [eax]
push eax
call fcn.00422124
add esp, 4
mov dword [ebp - 0xe8], eax
cmp dword [ebp - 0x34], ebx
jb 0x404cab
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.00420fa6
add esp, 4
mov ecx, dword [ebp - 0x128]
mov esi, dword [ebp - 0x12c]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 3
lea eax, [ebp - 0x104]
jbe 0x404cd7
lea eax, [esi + 0x24]
push eax
lea ecx, [ebp - 0xd4]
call fcn.00406040
mov esi, eax
lea ecx, [ebp - 0x80]
push ecx
lea edx, [ebp - 0x48]
push edx
mov byte [ebp - 4], 0x11
call fcn.00409920
push eax
mov eax, str._packages_files_
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 0x12
call fcn.004099e0
add esp, 0xc
mov ecx, eax
lea eax, [ebp - 0xb8]
push eax
mov eax, esi
mov byte [ebp - 4], 0x13
call fcn.00409a30
add esp, 4
mov edi, eax
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], 0x14
call fcn.00411050
cmp dword [ebp - 0xa4], ebx
jb 0x404d4a
mov ecx, dword [ebp - 0xb8]
push ecx
call fcn.00420fa6
add esp, 4
xor esi, esi
mov edi, 0xf
mov dword [ebp - 0xa4], edi
mov dword [ebp - 0xa8], esi
mov byte [ebp - 0xb8], 0
cmp dword [ebp - 0x88], ebx
jb 0x404d7b
mov edx, dword [ebp - 0x9c]
push edx
call fcn.00420fa6
add esp, 4
mov dword [ebp - 0x88], edi
mov dword [ebp - 0x8c], esi
mov byte [ebp - 0x9c], 0
cmp dword [ebp - 0x34], ebx
jb 0x404d9f
mov eax, dword [ebp - 0x48]
push eax
call fcn.00420fa6
add esp, 4
mov byte [ebp - 4], 0xf
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], esi
mov byte [ebp - 0x48], 0
cmp dword [ebp - 0xc0], ebx
jb 0x404dc4
mov ecx, dword [ebp - 0xd4]
push ecx
call fcn.00420fa6
add esp, 4
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0xe0], esi
cmp dword [ebp - 0x18], ebx
jae 0x404dd5
lea eax, [ebp - 0x2c]
mov ecx, dword [ebp - 0xe8]
lea edx, [ebp - 0xe0]
push edx
mov edx, dword [ebp - 0xe4]
push ecx
push edx
push eax
lea edi, [ebp - 0x158]
call fcn.004112d0
mov edx, eax
lea ecx, [ebp - 0x1b8]
call fcn.004128c0
mov edi, eax
mov dword [ebp - 0xe8], edi
cmp edi, esi
je 0x404fcd
mov ecx, dword [ebp - 0xe0]
lea eax, [ebp - 0xe4]
push eax
push ecx
push edi
mov dword [ebp - 0xe4], esi
call fcn.00405200
mov dword [ebp - 0xe0], eax
cmp eax, esi
je 0x404fc4
lea edx, [ebp - 0xf8]
push edx
call fcn.0041d740
add esp, 4
push eax
lea eax, [ebp - 0x138]
push eax
mov ebx, str.patch_
mov byte [ebp - 4], 0x15
call fcn.00405e20
add esp, 8
lea edi, [ebp - 0xd8]
mov byte [ebp - 4], 0x16
call fcn.004059d0
mov byte [ebp - 4], 0x15
mov eax, dword [ebp - 0x138]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404e98
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xf
mov eax, dword [ebp - 0xf8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404ebe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xd8]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push ecx
call ebx
cmp eax, 0xffffffff
jne 0x404ee1
mov edx, dword [ebp - 0xd8]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [ebp - 0xd8]
push eax
call ebx
cmp eax, 0xffffffff
je 0x404faf
cmp dword [0x44c128], 0x10
mov eax, dword [0x44c114]
jae 0x404f06
mov eax, 0x44c114
push eax
lea edi, [ebp - 0x158]
call fcn.004112d0
mov edx, eax
lea eax, [ebp - 0xd8]
call fcn.00405a40
mov edx, 0x43fdc8
lea eax, [ebp - 0xd8]
call fcn.00405a40
mov ecx, dword [ebp - 0xd8]
push ecx
call ebx
cmp eax, 0xffffffff
jne 0x404f4c
mov edx, dword [ebp - 0xd8]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [ebp - 0xd8]
push eax
call ebx
cmp eax, 0xffffffff
je 0x404faf
lea ecx, [ebp - 0xf0]
push ecx
lea edx, [ebp - 0xec]
push edx
lea ebx, [ebp - 0xd8]
call fcn.00405d70
add esp, 8
push 0
push 0x80
push 2
push 0
push 0
mov byte [ebp - 4], 0x17
mov eax, dword [ebp - 0xec]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x404fe6
lea ecx, [ebp - 0xec]
mov byte [ebp - 4], 0xf
call fcn.004059b0
mov ecx, dword [ebp - 0xe0]
push ecx
call fcn.00420fa6
mov edi, dword [ebp - 0xe8]
add esp, 4
push edi
call fcn.00420fa6
add esp, 4
push 0x442d0c
push 0
call fcn.004221b6
add esp, 8
test eax, eax
jne 0x404b20
jmp 0x405053
mov eax, dword [ebp - 0xe4]
mov ecx, dword [ebp - 0xe0]
push 0
lea edx, [ebp - 0xf8]
push edx
push eax
push ecx
push ebx
mov dword [ebp - 0xf8], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0xd8]
lea edi, [ebp - 0xf4]
call fcn.004059d0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0xf
mov eax, dword [ebp - 0xec]
add eax, 0xfffffff0
mov byte [ebp - 0xd9], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405053
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x134]
test eax, eax
je 0x405066
push eax
call fcn.00420fa6
add esp, 4
mov edi, dword [ebp - 0xf4]
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405071
sub eax, edx
sar eax, 1
push eax
mov eax, edi
mov ecx, 0x44c0dc
call fcn.00401700
mov ebx, 0x10
cmp dword [ebp - 0x6c], ebx
jb 0x4050a3
mov ecx, dword [ebp - 0x80]
push ecx
call fcn.00420fa6
add esp, 4
lea edx, [ebp - 0x168]
push edx
mov dword [ebp - 0x6c], 0xf
mov dword [ebp - 0x70], 0
mov byte [ebp - 0x80], 0
mov byte [ebp - 4], 0xd
call fcn.00406200
mov eax, dword [ebp - 0x12c]
test eax, eax
je 0x4050d8
push eax
call fcn.00420fa6
add esp, 4
cmp dword [ebp - 0x50], ebx
jb 0x4050e9
mov eax, dword [ebp - 0x64]
push eax
call fcn.00420fa6
add esp, 4
mov eax, dword [ebp - 0x1b4]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x50], 0xf
mov dword [ebp - 0x54], 0
mov byte [ebp - 0x64], 0
mov dword [ebp - method.CDMHttp.virtual_0], vtable.CDMHttp.0
test eax, eax
je 0x405118
push eax
call esi
mov eax, dword [ebp - 0x1b0]
test eax, eax
je 0x405125
push eax
call esi
mov eax, dword [ebp - 0x1ac]
test eax, eax
je 0x405132
push eax
call esi
cmp dword [ebp - 0x18], ebx
jb 0x405143
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00420fa6
add esp, 4
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0xd8]
add eax, 0xfffffff0
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40517b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40519b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xf0]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4051c1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x158]
push ecx
mov dword [ebp - 4], 0xffffffff
call fcn.00401aa0
mov al, byte [ebp - 0xd9]
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.00420fb1
mov esp, ebp
pop ebp
ret