Function at 0x407010
Capabilities:
Create directory
Extract resource via kernel32 functions
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4530c7
mov eax, dword fs:[0]
push eax
sub esp, 0x6c0
mov eax, dword [0x46a860]
xor eax, esp
mov dword [esp + 0x6b8], eax
push ebx
push esi
push edi
mov eax, dword [0x46a860]
xor eax, esp
push eax
lea eax, [esp + 0x6d0]
mov dword fs:[0], eax
push 0x1ff
lea eax, [esp + 0x4c9]
mov esi, ecx
push 0
push eax
mov dword [esp + 0x2c], esi
mov byte [esp + 0x4d0], 0
call fcn.00437860
add esp, 0xc
lea edi, [esi + 0x40]
push edi
mov dword [esp + 0x54], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push edi
mov dword [esi + 0x3c], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 4
call fcn.0041981a
add esp, 4
test eax, eax
je 0x4070a7
mov dword [eax], 0
jmp 0x4070a9
xor eax, eax
lea ecx, [esi + 0x30]
push 4
mov dword [esp + 0x48], ecx
mov dword [ecx], eax
call fcn.0041981a
add esp, 4
test eax, eax
je 0x4070c8
mov dword [eax], 0
jmp 0x4070ca
xor eax, eax
lea ecx, [esi + 0x34]
push 4
mov dword [esp + 0x44], ecx
mov dword [ecx], eax
call fcn.0041981a
add esp, 4
test eax, eax
je 0x4070e9
mov dword [eax], 0
jmp 0x4070eb
xor eax, eax
lea ecx, [esi + 0x38]
mov dword [ecx], eax
mov eax, dword [esi + 0x10]
test eax, eax
mov dword [esp + 0x48], ecx
je 0x4076b2
lea ecx, [esp + 0x184]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40712d
push 0xffffffffffffffff
call ebx
mov edx, dword [esi + 0x10]
push 0
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExA]
push edi
call ebx
push 0x200
lea eax, [esp + 0x4c8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x4c4]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
mov dword [esp + 0x30], edi
je 0x4076b2
movzx edx, word [ebp + 8]
push str.RT_RCDATA
push edx
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
je 0x4076b2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4076ac
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
mov dword [esp + 0x18], eax
je 0x4076b2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, dword [esp + 0x18]
push 3
push eax
xor edi, edi
call fcn.0040d180
mov edi, eax
mov eax, dword [esi + 0x10]
push eax
mov eax, edi
call fcn.0040d2c0
add esp, 0xc
push 0x12c
lea ecx, [esp + 0x58]
push 0
push ecx
call fcn.00437860
add esp, 0xc
push 0xffffffffffffffff
lea edx, [esp + 0x58]
mov eax, edi
call fcn.0040d280
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x58]
add esp, 4
push 0
push 0
push eax
push ecx
mov dword [esp + 0x24], edx
call dword [sym.imp.USER32.dll_SendMessageA]
xor ebx, ebx
cmp dword [esp + 0x14], ebx
jbe 0x40729d
mov dword [esp + 0x18], ebx
push 0x12c
lea edx, [esp + 0x58]
push 0
push edx
call fcn.00437860
add esp, 0xc
push ebx
lea edx, [esp + 0x58]
mov eax, edi
call fcn.0040d280
add esp, 4
test edi, edi
jne 0x407246
mov dword [0x46fff8], 0x10000
jmp 0x40726a
cmp dword [edi], 1
je 0x407257
mov dword [0x46fff8], 0x80000
jmp 0x40726a
mov eax, dword [edi + 4]
push ebx
push eax
lea ecx, [esp + 0x60]
call fcn.0040ce10
mov dword [0x46fff8], eax
mov eax, dword [esp + 0x18]
xor edx, edx
div dword [esp + 0x14]
mov ecx, dword [esi + 4]
push eax
mov dword [esi + 0x58], eax
mov eax, dword [esi + 8]
push 0
push eax
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
add dword [esp + 0x18], 0x12c
add ebx, 1
cmp ebx, dword [esp + 0x14]
jb 0x407213
mov edx, dword [esi + 0x58]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push edx
push 0
push eax
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
call fcn.0040d300
mov edx, dword [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor edi, edi
mov dword [esp + 0x34], vtable.CFileListXml.0
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edi
push 0x1ff
lea eax, [esp + 0x2c9]
push edi
mov dword [esp + 0x6e0], edi
push eax
mov byte [esp + 0x2d0], 0
call fcn.00437860
mov ecx, dword [esi + 0x10]
add esp, 0xc
push ecx
lea edx, [esp + 0x2c8]
push 0x200
push edx
call fcn.00436837
add esp, 0xc
push 0x45f710
lea eax, [esp + 0x2c8]
push 0x200
push eax
call fcn.004369f5
add esp, 0xc
call fcn.0041984f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x407345
push 0x80004005
call fcn.00402980
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x6d8], 1
call fcn.0041984f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x407377
push 0x80004005
call fcn.00402980
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x14], edi
lea esi, [esp + 0x24]
call fcn.00406590
lea ecx, [esp + 0x18]
push ecx
lea ebx, [esp + 0x2c8]
mov byte [esp + 0x6dc], 3
call fcn.00405680
test eax, eax
mov ebx, dword [esp + 0x18]
je 0x407642
mov ecx, str.1.0.0
mov eax, ebx
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4073e0
test dl, dl
je 0x4073dc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4073e0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4073c0
xor eax, eax
jmp 0x4073e5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407642
lea edx, [esp + 0x24]
push edx
lea ebx, [esp + 0x2c8]
call fcn.004057a0
test eax, eax
jne 0x40744b
push eax
push eax
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 4]
push 0x467
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
lea esi, [esp + 0x24]
call fcn.00405a90
lea ecx, [esp + 0x14]
call fcn.00402ae0
lea ecx, [esp + 0x18]
call fcn.00402ae0
lea esi, [esp + 0x34]
mov dword [esp + 0x6d8], 0xffffffff
call fcn.004052b0
jmp 0x4076b2
mov esi, dword [esp + 0x20]
lea edx, [esi + 0x60]
push edx
lea ebx, [esp + 0x2c8]
call fcn.004057a0
mov eax, dword [esi + 0xc]
push eax
lea ecx, [esp + 0x20]
call fcn.004029f0
push str.LauncherCfgNewUpdateCfg.xml
lea ecx, [esp + 0x20]
mov byte [esp + 0x6dc], 4
call fcn.004043b0
mov ebx, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push ecx
call fcn.00406ce0
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x2c]
push ebx
push edi
mov dword [esp + 0x38], eax
call fcn.00436db9
add esp, 8
test eax, eax
push edi
mov edi, dword [esp + 0x18]
push edi
jge 0x4074ff
call fcn.00436db9
add esp, 8
test eax, eax
jl 0x4074d1
push ebx
push edi
call fcn.00436db9
add esp, 8
test eax, eax
jg 0x4074d1
mov ebx, 1
jmp 0x4074d3
xor ebx, ebx
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push str.upgrade
call edi
lea ecx, [esp + 0x2c]
call fcn.00408b90
push eax
call edi
lea ecx, [esp + 0x24]
call fcn.00408b90
push eax
call edi
mov edx, dword [esp + 0x14]
push edx
jmp 0x40754c
call fcn.00436db9
add esp, 8
test eax, eax
jg 0x407520
push ebx
push edi
call fcn.00436db9
add esp, 8
test eax, eax
jl 0x407520
mov ebx, 1
jmp 0x407522
xor ebx, ebx
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push str.degrade
call edi
lea ecx, [esp + 0x2c]
call fcn.00408b90
push eax
call edi
lea ecx, [esp + 0x24]
call fcn.00408b90
push eax
call edi
mov eax, dword [esp + 0x14]
push eax
call edi
cmp dword [esp + 0x30], 0
je 0x407621
test ebx, ebx
je 0x407621
mov ecx, dword [esp + 0x44]
push ecx
lea edx, [esp + 0x2c8]
push edx
lea ecx, [esp + 0x3c]
call fcn.00405390
mov dword [esi + 0x5c], eax
mov eax, dword [esp + 0x48]
push eax
lea ecx, [esp + 0x2c8]
push ecx
lea ecx, [esp + 0x3c]
call fcn.00405390
mov edx, dword [esp + 0x40]
push edx
lea eax, [esp + 0x2c8]
push eax
lea ecx, [esp + 0x3c]
call fcn.00405390
mov ecx, dword [esi + 0xc]
push ecx
lea ecx, [esp + 0x50]
call fcn.004029f0
mov edx, dword [esi + 0xc]
push edx
call fcn.00414f91
mov edi, dword [esp + 0x50]
mov ebx, 1
push edi
mov dword [esi + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push edi
mov dword [esi + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [esp + 0x4c]
call fcn.00402ae0
lea ecx, [esp + 0x1c]
call fcn.00402ae0
lea esi, [esp + 0x24]
call fcn.00405a90
lea ecx, [esp + 0x14]
call fcn.00402ae0
lea ecx, [esp + 0x18]
call fcn.00402ae0
lea esi, [esp + 0x34]
mov dword [esp + 0x6d8], 0xffffffff
call fcn.004052b0
mov eax, ebx
jmp 0x4076b4
mov eax, dword [esi + 4]
push 0
push 0
push 0x467
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
lea ecx, [esp + 0x1c]
call fcn.00402ae0
jmp 0x407417
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 4]
push 0
push 0
push 0x466
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
lea esi, [esp + 0x24]
call fcn.00405a90
lea eax, [edi - 0x10]
mov byte [esp + 0x6d8], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407686
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [esp + 0x6d8], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4076b2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4076b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
mov ecx, dword [esp + 0x6d0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6b8]
xor ecx, esp
call fcn.00435417
mov esp, ebp
pop ebp
ret 4