Function at 0x401f20
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x38
mov eax, dword [ecx]
mov ebx, dword [ecx + 4]
cmp eax, 3
je 0x4020d0
ja 0x402098
cmp eax, 1
je 0x4020f8
cmp eax, 2
jne 0x402267
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x402130
mov edx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 8], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call edx
mov esi, eax
sub esp, 0x18
mov eax, dword fs:[0x18]
mov edi, eax
lea eax, [esi + esi]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov dword [ebp - 0x1c], edi
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x402130
mov ecx, dword [ebp - 0x24]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov edx, dword [ebp - 0x20]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov dword [esp], 0
call edx
mov eax, dword [ebx + 0x10]
sub esp, 0x18
test eax, eax
je 0x402132
mov edx, edi
call sym._path_combine.part.0
mov dword [esp + 8], edi
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
mov esi, eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
sub esp, 0xc
test esi, esi
je 0x402156
test byte [section..data], 8
jne 0x4021d8
mov eax, esi
call dbg.create_parent_directory
test eax, eax
jne 0x402160
mov dword [esp + 8], esi
mov ebx, 0xffffffff
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
sub esp, 0xc
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
xor ebx, ebx
cmp eax, 4
jne 0x402087
test byte [section..data], 1
je 0x402087
mov dword [esp + 0xc], str.fdintNEXT_CABINET_not_implemented_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 4], 0x40a000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x402087
mov eax, dword [ebx + 0x14]
mov ebx, 1
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, ebx
sub esp, 4
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
xor ebx, ebx
test byte [section..data], 1
je 0x402087
mov dword [esp + 0xc], str.fdintPARTIAL_FILE_not_implemented_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 4], 0x40a000
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x402087
xor edi, edi
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
or ebx, 0xffffffff
jmp 0x402087
movzx eax, word [ebx + 0x1c]
mov edx, pe_nt_image_headers32
mov dword [esp], esi
mov dword [esp + 0x18], 0
test eax, eax
mov dword [esp + 0x10], 2
cmove eax, edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x14], eax
mov dword [esp + 4], 0xc0000000
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov ebx, eax
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
sub esp, 0xc
cmp ebx, 0xffffffff
jne 0x402087
jmp 0x402156
mov eax, esi
shr eax, 0x10
je 0x402250
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, 0x40b00d
sub esp, 8
test eax, eax
jne 0x40220a
mov edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn.part.0
mov edx, eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x1c], edx
call sym._wine_dbgstr_an.constprop.0
mov edx, dword [ebp - 0x1c]
mov dword [esp + 0xc], str.Extracting__s_____s_n
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov dword [esp + 8], 0x40ba34
mov dword [esp + 4], 0x40a000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x402053
movzx eax, si
mov dword [esp], section..rdata
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov edx, eax
jmp 0x40220a
xor ebx, ebx
jmp 0x402087