Function at 0x40180c
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5a4
mov dword [ebp - 4], 0
mov eax, dword [0x4127e0]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x10], 0x80000
push 0x150
push 0
lea ecx, [ebp - 0x170]
push ecx
call fcn.00403d00
add esp, 0xc
cmp dword [ebp + 0xc], 0
jne 0x401850
lea edx, [ebp - 0x170]
mov dword [ebp + 0xc], edx
mov eax, dword [ebp + 8]
push eax
push 0x40b378
lea ecx, [ebp - 0x5a0]
push ecx
call fcn.00403f7b
add esp, 0xc
lea edx, [ebp - 0x5a0]
push edx
push str.find__s_n
call fcn.0040100a
add esp, 8
push 0
lea eax, [ebp - 0x5a0]
push eax
push 0xa
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4018bf
push 0x183
push 0x40b390
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40b398
call fcn.0040100a
add esp, 0x10
xor eax, eax
jmp 0x401b59
push str.size__n
call fcn.0040100a
add esp, 4
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
push ecx
push str.size__u_n
call fcn.0040100a
add esp, 8
cmp dword [ebp - 8], 0x150
jb 0x401900
cmp dword [ebp - 8], 0x40000000
jbe 0x401918
mov edx, dword [ebp - 8]
push edx
push str.wrong_size__u_n
call fcn.0040100a
add esp, 8
xor eax, eax
jmp 0x401b59
mov eax, dword [ebp - 0x18]
push eax
push str.load__08x_n
call fcn.0040100a
add esp, 8
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x580], eax
cmp dword [ebp - 0x580], 0
jne 0x40196b
push 0x18e
push 0x40b3e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40b3e8
call fcn.0040100a
add esp, 0x10
xor eax, eax
jmp 0x401b59
mov eax, dword [ebp - 0x580]
push eax
push str.lock__08x_n
call fcn.0040100a
add esp, 8
mov ecx, dword [ebp - 0x580]
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x20], eax
push 0x150
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004039c0
add esp, 0xc
mov ecx, dword [ebp - 0x20]
add ecx, 0x150
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 8]
sub edx, 0x150
mov dword [ebp - 0x178], edx
cmp dword [ebp + 0x10], 0
je 0x4019dc
mov eax, dword [ebp - 0x580]
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, 1
jmp 0x401b59
mov ecx, dword [0x410bf4]
push ecx
call fcn.00402720
add esp, 4
mov edx, dword [ebp + 0xc]
add edx, 0x20
push edx
push 0x4125e0
push 0x40b40c
lea eax, [ebp - 0x57c]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x57c]
push ecx
push str.Write_to__s_n
call fcn.0040100a
add esp, 8
push 0
lea edx, [ebp - 0x57c]
push edx
call dword [sym.imp.KERNEL32.dll__lcreat]
mov dword [ebp - 0x17c], eax
cmp dword [ebp - 0x17c], 0xffffffff
jne 0x401a70
push 0x19c
push 0x40b424
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40b42c
call fcn.0040100a
add esp, 0x10
mov eax, dword [ebp - 0x580]
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
xor eax, eax
jmp 0x401b59
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00403e41
add esp, 4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x178], 0
je 0x401b2e
mov edx, dword [ebp - 0x178]
cmp edx, dword [ebp - 0x10]
jae 0x401aa5
mov eax, dword [ebp - 0x178]
mov dword [ebp - 0x5a4], eax
jmp 0x401aae
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x5a4], ecx
mov edx, dword [ebp - 0x5a4]
mov dword [ebp - 0x174], edx
mov eax, dword [ebp - 0x174]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.004039c0
add esp, 0xc
mov eax, dword [ebp - 0x174]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.0040129f
add esp, 8
mov edx, dword [ebp - 0x174]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x17c]
push ecx
call dword [sym.imp.KERNEL32.dll__lwrite]
mov edx, dword [ebp - 0x178]
sub edx, dword [ebp - 0x174]
mov dword [ebp - 0x178], edx
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x174]
mov dword [ebp - 0xc], eax
mov ecx, dword [0x410bf4]
push ecx
call fcn.00402720
add esp, 4
jmp 0x401a7f
mov edx, dword [ebp - 0x14]
push edx
call fcn.00403d58
add esp, 4
mov eax, dword [ebp - 0x17c]
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
mov ecx, dword [ebp - 0x580]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, 1
mov esp, ebp
pop ebp
ret