Function at 0x405ac0
Capabilities:
Check if file exists
Create directory
Extract resource via kernel32 functions
Get file attributes
Write file on windows

Disassembly:
sub esp, 0x354
mov eax, dword [0x41c060]
xor eax, esp
mov dword [esp + 0x350], eax
xor eax, eax
push esi
mov esi, dword [esp + 0x35c]
push edi
push 0x103
push eax
mov dword [esp + 0x35], eax
mov dword [esp + 0x39], eax
mov dword [esp + 0x3d], eax
mov dword [esp + 0x41], eax
mov dword [esp + 0x45], eax
mov dword [esp + 0x49], eax
mov dword [esp + 0x4d], eax
mov word [esp + 0x51], ax
mov byte [esp + 0x53], al
mov byte [esp + 0x158], al
lea eax, [esp + 0x159]
push eax
mov dword [esp + 0x1c], esi
mov edi, 0x80004005
mov byte [esp + 0x38], 0
call fcn.004075f0
push 0x103
lea ecx, [esp + 0x5d]
push 0
push ecx
mov byte [esp + 0x64], 0
call fcn.004075f0
xor eax, eax
add esp, 0x18
test esi, esi
mov dword [esp + 8], 0
mov byte [esp + 0x20], 0
mov dword [esp + 0x21], eax
mov dword [esp + 0x25], eax
mov byte [esp + 0x29], al
je 0x405ec8
mov edi, dword [esp + 0x364]
push ebx
push ebp
push edi
lea edx, [esp + 0x2c]
push 0x417688
push edx
call fcn.00409727
mov ebx, dword [sym.imp.KERNEL32.dll_FindResourceA]
add esp, 0xc
push 0xa
lea eax, [esp + 0x2c]
push eax
push 0
call ebx
lea ecx, [edi + 1]
push ecx
lea edx, [esp + 0x2c]
push 0x417688
push edx
mov esi, eax
call fcn.00409727
add esp, 0xc
push 0xa
lea eax, [esp + 0x2c]
push eax
push 0
call ebx
add edi, 2
push edi
lea ecx, [esp + 0x2c]
push 0x417688
push ecx
mov ebp, eax
call fcn.00409727
add esp, 0xc
push 0xa
lea edx, [esp + 0x2c]
push edx
push 0
call ebx
test esi, esi
mov ebx, eax
je 0x405e9c
test ebp, ebp
je 0x405e9c
test ebx, ebx
je 0x405e9c
mov edi, dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push 0
call edi
push ebp
push 0
mov dword [esp + 0x28], eax
call edi
push ebx
push 0
mov dword [esp + 0x1c], eax
call edi
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LoadResource]
push 0
mov dword [esp + 0x2c], eax
call esi
push ebp
push 0
mov edi, eax
call esi
push ebx
push 0
mov ebp, eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_LockResource]
push edi
mov ebx, eax
call esi
mov edi, eax
push ebp
mov dword [esp + 0x20], edi
call esi
push ebx
mov ebp, eax
call esi
test edi, edi
mov esi, eax
je 0x405ea3
mov ebx, dword [esp + 0x20]
test ebx, ebx
jbe 0x405ea3
test ebp, ebp
je 0x405ea3
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x405ea3
test esi, esi
je 0x405ea3
mov edi, dword [esp + 0x24]
test edi, edi
jbe 0x405ea3
push eax
push ebp
push 0
call fcn.00405550
push eax
lea eax, [esp + 0x44]
push 0x417e7c
push eax
call fcn.00409727
push edi
lea ecx, [esp + 0x50]
push ecx
push esi
call fcn.00409710
add esp, 0x24
test eax, eax
je 0x405d02
push 0x30
push str.Error
push esi
mov esi, dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call esi
push 0x30
push str.Error
lea edx, [esp + 0x3c]
push edx
push 0
call esi
push 0x30
push str.Error
push str.Check_sum_failed_
push 0
call esi
mov eax, 1
pop ebp
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x350]
xor ecx, esp
call fcn.004075d4
add esp, 0x354
ret
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x158]
sub edx, eax
nop
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x405d10
lea edi, [esp + 0x158]
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x405d26
mov ecx, dword [esp + 0x1c]
mov ax, word [0x417710]
push ebx
push ecx
lea edx, [esp + 0x160]
push edx
mov word [edi], ax
call fcn.00409590
add esp, 0xc
xor eax, eax
mov cl, byte [esp + eax + 0x158]
mov byte [esp + eax + 0x54], cl
add eax, 1
test cl, cl
jne 0x405d51
lea eax, [esp + 0x54]
push 0x5c
push eax
call fcn.00407bb8
add esp, 8
test eax, eax
je 0x405d79
mov byte [eax], 0
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [esp + 0x54]
push ecx
call edi
cmp eax, 0xffffffff
jne 0x405e27
push 0x103
lea edx, [esp + 0x261]
push 0
push edx
mov byte [esp + 0x268], 0
call fcn.004075f0
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
add esp, 0xc
mov esi, 3
lea esp, [esp]
lea eax, [esp + esi + 0x54]
push 0x417710
push eax
call fcn.00408057
add esp, 8
test eax, eax
je 0x405e12
lea ecx, [esp + 0x54]
sub eax, ecx
mov esi, eax
push esi
mov edx, ecx
push edx
lea eax, [esp + 0x264]
push eax
call fcn.00407ae1
add esp, 0xc
lea ecx, [esp + 0x25c]
push ecx
add esi, 1
call edi
cmp eax, 0xffffffff
jne 0x405dc0
push 0
lea edx, [esp + 0x260]
push edx
call ebx
jmp 0x405dc0
lea eax, [esp + 0x54]
push eax
call edi
cmp eax, 0xffffffff
jne 0x405e27
push 0
lea ecx, [esp + 0x58]
push ecx
call ebx
push 0
push 0xa0
push 2
push 0
push 1
push 0x40000000
lea edx, [esp + 0x170]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x405ce4
cmp esi, 0xffffffff
je 0x405ebc
mov edi, dword [esp + 0x14]
push 0
lea eax, [esp + 0x14]
push eax
push edi
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x405ebc
cmp dword [esp + 0x10], edi
jne 0x405ebc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x158]
mov ecx, eax
sub edx, ecx
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x405e90
xor eax, eax
jmp 0x405ce9
push 0x30
push str.Error
push 0x417e50
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x405ce4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x405ce4
mov ecx, dword [esp + 0x358]
mov eax, edi
pop edi
pop esi
xor ecx, esp
call fcn.004075d4
add esp, 0x354
ret