Function at 0x4160f0
Capabilities:
Check if file exists
Extract resource via kernel32 functions
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44d4f8
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x48d06c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, dword [ebp + 8]
mov edx, ecx
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea ebx, [edx + 2]
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x416140
sub edx, ebx
sar edx, 1
push edx
push ecx
lea ecx, [ebp - 0x28]
call fcn.00407590
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
push edi
push str.HTML
mov byte [ebp - 4], 2
call fcn.00430a35
add esp, 8
test eax, eax
movzx eax, si
jne 0x41619c
push 0x17
jmp 0x41619d
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov dword [ebp - 0x4c], esi
test esi, esi
jne 0x4161ef
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4161e8
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4161de
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416369
push edx
push ecx
call fcn.0042297a
add esp, 8
xor eax, eax
jmp 0x41634d
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x28]
call fcn.00419420
cmp dword [eax + 0x14], 8
jb 0x416203
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edx, dword [ebp - 0x2c]
cmp eax, 0xffffffff
sete al
mov byte [ebp - 0x41], al
cmp edx, 8
jb 0x416250
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x416243
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41636e
push edx
push ecx
call fcn.0042297a
mov al, byte [ebp - 0x41]
add esp, 8
push esi
test al, al
je 0x416260
call dword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x4161ae
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
push esi
test edi, edi
jne 0x416279
call dword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x4161ae
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x4c], eax
push edi
test eax, eax
jne 0x41629a
call dword [sym.imp.KERNEL32.dll_FreeResource]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x4161ae
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x4162ba
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x4161ae
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x58]
cmovae eax, dword [ebp - 0x28]
sub esp, 0x18
push eax
call fcn.004087f0
mov ebx, dword [ebp - 0x58]
test eax, eax
js 0x4162fb
push 0
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x4c]
push dword [ebp - 0x50]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4162f4
call fcn.00408760
mov dword [ebp - 0x48], 1
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
test ebx, ebx
je 0x416314
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x41634a
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x416340
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416369
push edx
push ecx
call fcn.0042297a
add esp, 8
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00422308
mov esp, ebp
pop ebp
ret
call fcn.004309e5
call fcn.004309e5
int3