Function at 0x40d160
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov dword [ebp - 0x54], ecx
mov eax, dword [ebp - 0x54]
cmp dword [eax + 0x70], 0
je 0x40d17c
mov eax, 1
jmp 0x40d456
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x24], 0
push 0
push 0
push 0
push 0x45b084
call fcn.0041fb80
add esp, 0x10
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40d1b9
jmp 0x40d425
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00421700
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40d1d3
jmp 0x40d425
push 0x40
push 0x438b58
mov edx, dword [ebp - 0x14]
push edx
call fcn.00420090
add esp, 0xc
push 0
push eax
call fcn.00438bd4
add esp, 8
test eax, eax
je 0x40d1fa
jmp 0x40d425
push 0x45b08c
push 1
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x40d217
jmp 0x40d425
mov eax, dword [ebp - 0x3c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x40d231
jmp 0x40d425
mov ecx, dword [ebp - 0x3c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40d24b
jmp 0x40d425
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40d263
jmp 0x40d425
mov eax, dword [ebp - 4]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], 0
push 0x40d460
lea edx, [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.0041fd70
add esp, 0xc
push 0
push 0
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.0041f980
add esp, 0x10
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov dword [ecx + 0x74], eax
mov ecx, dword [ebp - 0x54]
mov edx, dword [ecx + 0x74]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 4]
mov dword [eax + 0x78], edx
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + 0x78]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 8]
movzx eax, byte [edx + 0x19]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 8]
movzx edx, byte [ecx + 0x1e]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.0041fcc0
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x28], 6
je 0x40d30b
jmp 0x40d425
mov edx, dword [ebp - 0x20]
imul edx, dword [ebp - 0x1c]
shl edx, 2
push edx
call fcn.0044de72
add esp, 4
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x50]
mov dword [eax + 0x70], ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [edx + 0x70]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], 0
jmp 0x40d345
mov ecx, dword [ebp - 0x44]
add ecx, 1
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x44]
cmp edx, dword [ebp - 0x1c]
jge 0x40d41e
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + eax*4]
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x48]
lea edx, [ecx + eax*4]
mov dword [ebp - 0x4c], edx
jmp 0x40d374
mov eax, dword [ebp - 0x48]
add eax, 4
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
cmp ecx, dword [ebp - 0x4c]
jae 0x40d419
mov edx, dword [ebp - 0x48]
movzx eax, byte [edx + 2]
mov ecx, dword [ebp - 0x48]
movzx edx, byte [ecx + 3]
imul eax, edx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov ecx, dword [ebp - 0x40]
mov byte [ecx], al
mov edx, dword [ebp - 0x40]
add edx, 1
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x48]
movzx eax, byte [eax + 1]
mov ecx, dword [ebp - 0x48]
movzx edx, byte [ecx + 3]
imul eax, edx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov ecx, dword [ebp - 0x40]
mov byte [ecx], al
mov edx, dword [ebp - 0x40]
add edx, 1
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x48]
movzx eax, byte [eax]
mov ecx, dword [ebp - 0x48]
movzx edx, byte [ecx + 3]
imul eax, edx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov ecx, dword [ebp - 0x40]
mov byte [ecx], al
mov edx, dword [ebp - 0x40]
add edx, 1
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x48]
mov dl, byte [ecx + 3]
mov byte [eax], dl
mov eax, dword [ebp - 0x40]
add eax, 1
mov dword [ebp - 0x40], eax
jmp 0x40d36b
jmp 0x40d33c
mov dword [ebp - 0x10], 1
cmp dword [ebp - 0x24], 0
je 0x40d435
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [ebp - 0x14], 0
jne 0x40d441
cmp dword [ebp - 8], 0
je 0x40d453
push 0
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x14]
push eax
call fcn.0041fbb0
add esp, 0xc
mov eax, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret