Function at 0x40ba68
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa0
mov eax, 0x4c0010
call fcn.004afb5c
mov dword [ebp - 0x30], 2
lea edx, [ebp + 0xc]
lea eax, [ebp + 0xc]
call fcn.004b9bd8
inc dword [ebp - 0x30]
mov word [ebp - 0x3c], 8
lea edx, [ebp + 8]
lea eax, [ebp + 8]
call fcn.004b9bd8
inc dword [ebp - 0x30]
lea eax, [ebp + 0xc]
call fcn.00408c78
push eax
lea eax, [ebp + 8]
call fcn.00408c78
push eax
mov edx, dword [0x4db5a8]
push dword [edx]
call sub.KERNEL32.DLL_FindResourceA
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x40bafc
xor eax, eax
push eax
dec dword [ebp - 0x30]
lea eax, [ebp + 8]
mov edx, 2
call fcn.004b9d00
dec dword [ebp - 0x30]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.004b9d00
pop eax
mov edx, dword [ebp - 0x4c]
mov dword fs:[0], edx
jmp 0x40bdc5
push dword [ebp - 0x50]
mov ecx, dword [0x4db5a8]
push dword [ecx]
call sub.KERNEL32.DLL_LoadResource
mov dword [ebp - 0x54], eax
push dword [ebp - 0x54]
call sub.KERNEL32.DLL_LockResource
mov dword [ebp - 0x58], eax
mov word [ebp - 0x3c], 0x14
mov edx, 0x4bf8ef
lea eax, [ebp - 4]
call fcn.004b9ba0
inc dword [ebp - 0x30]
mov word [ebp - 0x3c], 8
mov word [ebp - 0x3c], 0x20
mov edx, 0x4bf8f0
lea eax, [ebp - 8]
call fcn.004b9ba0
inc dword [ebp - 0x30]
lea edx, [ebp - 8]
lea eax, [ebp + 0xc]
call fcn.004b9de4
push eax
dec dword [ebp - 0x30]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004b9d00
pop ecx
test cl, cl
je 0x40bbf8
mov word [ebp - 0x3c], 0x2c
push dword [ebp + 8]
lea eax, [ebp - 0xc]
call fcn.00401790
push eax
inc dword [ebp - 0x30]
call fcn.0040b540
add esp, 8
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 0x14]
call fcn.00401790
push eax
inc dword [ebp - 0x30]
mov edx, 0x4bf8f8
lea eax, [ebp - 0x10]
call fcn.004b9ba0
inc dword [ebp - 0x30]
lea edx, [ebp - 0x10]
pop ecx
pop eax
call fcn.004b9d58
lea edx, [ebp - 0x14]
lea eax, [ebp - 4]
call fcn.004b9d30
dec dword [ebp - 0x30]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004b9d00
dec dword [ebp - 0x30]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004b9d00
dec dword [ebp - 0x30]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004b9d00
jmp 0x40bcb5
mov word [ebp - 0x3c], 0x38
mov edx, 0x4bf8fd
lea eax, [ebp - 0x18]
call fcn.004b9ba0
inc dword [ebp - 0x30]
lea edx, [ebp - 0x18]
lea eax, [ebp + 0xc]
call fcn.004b9de4
push eax
dec dword [ebp - 0x30]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.004b9d00
pop ecx
test cl, cl
je 0x40bcb5
mov word [ebp - 0x3c], 0x44
push dword [ebp + 8]
lea eax, [ebp - 0x1c]
call fcn.00401790
push eax
inc dword [ebp - 0x30]
call fcn.0040b540
add esp, 8
lea edx, [ebp - 0x1c]
push edx
lea eax, [ebp - 0x24]
call fcn.00401790
push eax
inc dword [ebp - 0x30]
mov edx, str..dll
lea eax, [ebp - 0x20]
call fcn.004b9ba0
inc dword [ebp - 0x30]
lea edx, [ebp - 0x20]
pop ecx
pop eax
call fcn.004b9d58
lea edx, [ebp - 0x24]
lea eax, [ebp - 4]
call fcn.004b9d30
dec dword [ebp - 0x30]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.004b9d00
dec dword [ebp - 0x30]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.004b9d00
dec dword [ebp - 0x30]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.004b9d00
mov eax, dword [ebp - 4]
call fcn.0047695c
test al, al
je 0x40bcc9
mov eax, dword [ebp - 4]
call fcn.004b9b14
mov eax, dword [ebp - 4]
call fcn.00476864
mov dword [ebp - 0x5c], eax
mov word [ebp - 0x3c], 8
push dword [ebp - 0x50]
mov edx, dword [0x4db5a8]
push dword [edx]
call sub.KERNEL32.DLL_SizeofResource
mov dword [ebp - 0x60], eax
push 0
lea ecx, [ebp - 0x60]
push ecx
push dword [ebp - 0x60]
push dword [ebp - 0x58]
push dword [ebp - 0x5c]
call sub.KERNEL32.DLL_WriteFile
test eax, eax
jne 0x40bd7f
mov word [ebp - 0x3c], 0x50
lea eax, [ebp - 0x28]
call fcn.00401790
mov ecx, eax
inc dword [ebp - 0x30]
lea edx, [ebp - 4]
mov eax, str.An_error_occurred_when_liberating_file
call fcn.004ba340
lea eax, [ebp - 0x28]
mov eax, dword [eax]
call fcn.00446fa4
dec dword [ebp - 0x30]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.004b9d00
xor eax, eax
push eax
dec dword [ebp - 0x30]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004b9d00
dec dword [ebp - 0x30]
lea eax, [ebp + 8]
mov edx, 2
call fcn.004b9d00
dec dword [ebp - 0x30]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.004b9d00
pop eax
mov edx, dword [ebp - 0x4c]
mov dword fs:[0], edx
jmp 0x40bdc5
mov eax, dword [ebp - 0x5c]
call fcn.004768ec
mov al, 1
push eax
dec dword [ebp - 0x30]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004b9d00
dec dword [ebp - 0x30]
lea eax, [ebp + 8]
mov edx, 2
call fcn.004b9d00
dec dword [ebp - 0x30]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.004b9d00
pop eax
mov edx, dword [ebp - 0x4c]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret