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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
push ebx
push esi
push edi
lea ebx, [ebp - 0x4c]
mov eax, 0x4bb024
call fcn.004aad94
mov dword [ebx + 0x1c], 2
lea edx, [ebp + 0xc]
lea eax, [ebp + 0xc]
call fcn.004b4e10
inc dword [ebx + 0x1c]
lea edx, [ebp + 8]
mov word [ebx + 0x10], 8
lea eax, [ebp + 8]
call fcn.004b4e10
inc dword [ebx + 0x1c]
cmp dword [ebp + 0xc], 0
je 0x40a732
mov edx, dword [ebp + 0xc]
jmp 0x40a737
mov edx, 0x4ba902
push edx
cmp dword [ebp + 8], 0
je 0x40a743
mov eax, dword [ebp + 8]
jmp 0x40a748
mov eax, 0x4ba901
push eax
mov edx, dword [0x4d72dc]
mov ecx, dword [edx]
push ecx
call sub.KERNEL32.DLL_FindResourceA
mov esi, eax
test esi, esi
jne 0x40a78f
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp + 8]
dec dword [ebx + 0x1c]
call fcn.004b4f38
dec dword [ebx + 0x1c]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.004b4f38
pop eax
mov edx, dword [ebx]
mov dword fs:[0], edx
jmp 0x40aa48
push esi
mov ecx, dword [0x4d72dc]
mov eax, dword [ecx]
push eax
call sub.KERNEL32.DLL_LoadResource
push eax
call sub.KERNEL32.DLL_LockResource
mov dword [ebp - 0x50], eax
lea eax, [ebp - 4]
mov word [ebx + 0x10], 0x14
mov edx, 0x4ba903
call fcn.004b4dd8
inc dword [ebx + 0x1c]
mov edx, 0x4ba904
mov word [ebx + 0x10], 8
mov word [ebx + 0x10], 0x20
lea eax, [ebp - 8]
call fcn.004b4dd8
inc dword [ebx + 0x1c]
lea edx, [ebp - 8]
lea eax, [ebp + 0xc]
call fcn.004b501c
push eax
dec dword [ebx + 0x1c]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004b4f38
pop ecx
test cl, cl
je 0x40a884
mov word [ebx + 0x10], 0x2c
mov eax, dword [ebp + 8]
push eax
xor edx, edx
mov dword [ebp - 0xc], edx
lea ecx, [ebp - 0xc]
push ecx
inc dword [ebx + 0x1c]
call fcn.0040a178
add esp, 8
lea eax, [ebp - 0xc]
push eax
mov edx, 0x4ba90c
lea eax, [ebp - 0x10]
call fcn.004b4dd8
inc dword [ebx + 0x1c]
xor ecx, ecx
mov dword [ebp - 0x14], ecx
lea ecx, [ebp - 0x14]
inc dword [ebx + 0x1c]
lea edx, [ebp - 0x10]
pop eax
call fcn.004b4f90
lea edx, [ebp - 0x14]
lea eax, [ebp - 4]
call fcn.004b4f68
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004b4f38
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004b4f38
dec dword [ebx + 0x1c]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004b4f38
jmp 0x40a940
mov word [ebx + 0x10], 0x38
mov edx, 0x4ba911
lea eax, [ebp - 0x18]
call fcn.004b4dd8
inc dword [ebx + 0x1c]
lea edx, [ebp - 0x18]
lea eax, [ebp + 0xc]
call fcn.004b501c
push eax
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.004b4f38
pop ecx
test cl, cl
je 0x40a940
mov word [ebx + 0x10], 0x44
mov eax, dword [ebp + 8]
push eax
xor edx, edx
mov dword [ebp - 0x1c], edx
lea ecx, [ebp - 0x1c]
push ecx
inc dword [ebx + 0x1c]
call fcn.0040a178
add esp, 8
lea eax, [ebp - 0x1c]
push eax
mov edx, str..dll
lea eax, [ebp - 0x20]
call fcn.004b4dd8
inc dword [ebx + 0x1c]
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea ecx, [ebp - 0x24]
inc dword [ebx + 0x1c]
lea edx, [ebp - 0x20]
pop eax
call fcn.004b4f90
lea edx, [ebp - 0x24]
lea eax, [ebp - 4]
call fcn.004b4f68
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.004b4f38
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.004b4f38
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.004b4f38
mov eax, dword [ebp - 4]
call fcn.00473c34
test al, al
je 0x40a954
mov eax, dword [ebp - 4]
call fcn.004b4d4c
mov eax, dword [ebp - 4]
call fcn.00473b3c
mov word [ebx + 0x10], 8
mov edi, eax
mov eax, dword [0x4d72dc]
push esi
mov edx, dword [eax]
push edx
call sub.KERNEL32.DLL_SizeofResource
mov dword [ebp - 0x54], eax
lea ecx, [ebp - 0x54]
push 0
push ecx
mov eax, dword [ebp - 0x54]
push eax
mov edx, dword [ebp - 0x50]
push edx
push edi
call sub.KERNEL32.DLL_WriteFile
test eax, eax
jne 0x40aa04
mov word [ebx + 0x10], 0x50
xor ecx, ecx
mov dword [ebp - 0x28], ecx
lea ecx, [ebp - 0x28]
inc dword [ebx + 0x1c]
lea edx, [ebp - 4]
mov eax, str.An_error_occurred_when_liberating_file
call fcn.004b5578
lea eax, [ebp - 0x28]
mov eax, dword [eax]
call fcn.0044427c
dec dword [ebx + 0x1c]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.004b4f38
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 4]
dec dword [ebx + 0x1c]
call fcn.004b4f38
dec dword [ebx + 0x1c]
lea eax, [ebp + 8]
mov edx, 2
call fcn.004b4f38
dec dword [ebx + 0x1c]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.004b4f38
pop eax
mov edx, dword [ebx]
mov dword fs:[0], edx
jmp 0x40aa48
mov eax, edi
call fcn.00473bc4
mov al, 1
mov edx, 2
push eax
lea eax, [ebp - 4]
dec dword [ebx + 0x1c]
call fcn.004b4f38
dec dword [ebx + 0x1c]
lea eax, [ebp + 8]
mov edx, 2
call fcn.004b4f38
dec dword [ebx + 0x1c]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.004b4f38
pop eax
mov edx, dword [ebx]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret