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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x554
mov eax, dword [0x404060]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x404bc4]
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 0
jne 0x4019e1
push 0
push 1
push 0x800a
mov ecx, dword [0x404bc4]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
xor eax, eax
jmp 0x401c6d
push 0
movzx eax, word [ebp + 8]
push eax
push 0xa
mov ecx, dword [ebp - 0x124]
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
mov dword [ebp - 0x554], eax
cmp dword [ebp - 0x554], 0
jne 0x401a65
mov edx, dword [ebp - 0x124]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x404bc9
lea eax, [ebp - 0x230]
push eax
call sub.MSVCR71.dll_strcpy
add esp, 8
push 0
lea ecx, [ebp - 0x230]
push ecx
push 0x800c
mov edx, dword [0x404bc4]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 0
push 0x800a
mov ecx, dword [0x404bc4]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
xor eax, eax
jmp 0x401c6d
mov eax, dword [ebp - 0x554]
push eax
mov ecx, dword [ebp - 0x124]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x118], eax
cmp dword [ebp - 0x118], 0
jne 0x401aa8
push 0
push 2
push 0x800a
mov edx, dword [0x404bc4]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
xor eax, eax
jmp 0x401c6d
mov ecx, dword [ebp - 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x33c], eax
cmp dword [ebp - 0x33c], 0
jne 0x401ae4
push 0
push 3
push 0x800a
mov edx, dword [0x404bc4]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
xor eax, eax
jmp 0x401c6d
lea ecx, [ebp - 0x338]
push ecx
lea edx, [ebp - 0x110]
push edx
lea eax, [ebp - 0x550]
push eax
lea ecx, [ebp - 0x448]
push ecx
mov edx, dword [ebp - 0x33c]
push edx
call dword [sym.imp.MSVCR71.dll__splitpath]
add esp, 0x14
lea eax, [ebp - 0x338]
push eax
lea ecx, [ebp - 0x110]
push ecx
push 0x404054
lea edx, [ebp - 0x230]
push edx
call dword [sym.imp.MSVCR71.dll_sprintf]
add esp, 0x10
cmp dword [ebp + 8], 0x64
jne 0x401b55
lea eax, [ebp - 0x230]
push eax
mov ecx, dword [0x404bc4]
add ecx, 0x10c
push ecx
call sub.MSVCR71.dll_strcpy
add esp, 8
push 0
lea edx, [ebp - 0x230]
push edx
push 0x800c
mov eax, dword [0x404bc4]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [ebp - 0x554]
push edx
mov eax, dword [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
sub eax, 0x104
mov dword [ebp - 0x11c], eax
push 0x40405c
lea ecx, [ebp - 0x230]
push ecx
call dword [sym.imp.MSVCR71.dll_fopen]
add esp, 8
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
je 0x401c2e
mov dword [ebp - 0x114], 0
mov edx, dword [ebp - 0x114]
cmp edx, dword [ebp - 0x11c]
jge 0x401c0e
mov eax, dword [ebp - 0x120]
push eax
mov ecx, dword [ebp - 0x11c]
sub ecx, dword [ebp - 0x114]
push ecx
push 1
mov edx, dword [ebp - 0x114]
mov eax, dword [ebp - 0x33c]
lea ecx, [eax + edx + 0x104]
push ecx
call dword [sym.imp.MSVCR71.dll_fwrite]
add esp, 0x10
add eax, dword [ebp - 0x114]
mov dword [ebp - 0x114], eax
jmp 0x401bbf
mov edx, dword [ebp - 0x120]
push edx
call dword [sym.imp.MSVCR71.dll_fflush]
add esp, 4
mov eax, dword [ebp - 0x120]
push eax
call dword [sym.imp.MSVCR71.dll_fclose]
add esp, 4
mov ecx, dword [ebp - 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov edx, dword [ebp - 0x124]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
jne 0x401c68
push 0
push 4
push 0x800a
mov eax, dword [0x404bc4]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
xor eax, eax
jmp 0x401c6d
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401dbb
mov esp, ebp
pop ebp
ret