Function at 0x410f80
Capabilities:
Check if file exists
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48a338
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x4bc704]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax]
sub eax, 0x10
call fcn.00404780
lea ebx, [eax + 0x10]
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 4], 1
mov esi, dword [ebx - 0xc]
test esi, esi
jns 0x410fd7
push 0x80070057
call fcn.00404c10
mov eax, dword [ebx - 8]
mov ecx, 1
sub ecx, dword [ebx - 4]
sub eax, esi
or eax, ecx
jge 0x410ff5
mov eax, esi
lea ecx, [ebp - 0x1c]
call fcn.00404bb0
mov ebx, dword [ebp - 0x1c]
lea ecx, [esi + 1]
push ecx
push ebx
call fcn.00469648
add esp, 8
cmp esi, dword [ebx - 8]
jg 0x410fcd
xor edx, edx
lea eax, [ebx - 0x10]
mov dword [ebx - 0xc], esi
mov word [ebx + esi*2], dx
mov dword [ebp - 0x18], eax
call fcn.00404780
add eax, 0x10
mov dword [ebp - 0x10], eax
push eax
mov byte [ebp - 4], 2
call fcn.00410dc0
mov edi, eax
mov ecx, edi
add esp, 4
mov dword [ebp - 0x14], edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x411038
sub ecx, edx
mov esi, ecx
call fcn.00410ec0
mov esi, eax
push esi
push str.id__s
lea edi, [ebp - 0x10]
call fcn.00408690
mov eax, dword [ebp - 0x14]
add esp, 8
test eax, eax
je 0x41106b
push eax
call fcn.004683dc
add esp, 4
test esi, esi
je 0x411078
push esi
call fcn.004683dc
add esp, 4
push 0x2e
push ebx
call fcn.00468696
add esp, 8
test eax, eax
jne 0x41108c
or eax, 0xffffffff
jmp 0x411090
sub eax, ebx
sar eax, 1
lea ecx, [eax + 1]
lea esi, [ebp - 0x14]
lea edx, [ebp - 0x1c]
call fcn.004045c0
mov byte [ebp - 4], 3
mov edi, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x10]
mov eax, dword [0x4c5fec]
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
jne 0x4110e8
lea eax, [edi - 0x10]
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4110dc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
lea eax, [ebx - 0x10]
jmp 0x4112d4
mov ecx, dword [0x4c5fec]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edx, dword [0x4c5fec]
push esi
push edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, eax
mov eax, dword [ebp + 0xc]
push eax
call esi
test eax, eax
jne 0x411138
mov ecx, dword [ebp + 0xc]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
mov edx, dword [ebp + 0xc]
push edx
call esi
test eax, eax
je 0x4112a7
push 0x49f46c
lea ecx, [ebp + 0xc]
push ecx
lea edx, [ebp - 0x24]
push edx
call fcn.00409300
mov byte [ebp - 4], 4
mov ecx, dword [ebp + 8]
push ecx
push eax
lea edx, [ebp - 0x20]
push edx
call fcn.0040a4b0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
add esp, 0x18
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411182
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x20]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x411288
push 0
lea edx, [ebp + 8]
push edx
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [ebp + 8], ebx
sete al
or edx, 0xffffffff
mov esi, eax
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4111e8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41120b
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 - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41122e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41124e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411274
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4112a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4112ca
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 - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4112ed
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41130d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411333
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret