Function at 0x10041650
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100cd393
mov eax, dword fs:[0]
push eax
sub esp, 0x2c8
mov eax, dword [0x10106404]
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 edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x2d0], edi
test edi, edi
je 0x10041a4c
test ebx, ebx
je 0x10041a4c
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2c8], 0
mov dword [ebp - 0x2cc], 0
test eax, eax
jne 0x10041930
call fcn.10030bd0
push eax
lea ecx, [ebp - 0xac]
call fcn.1002d4e0
mov dword [ebp - 4], 0
call fcn.10030be0
mov ecx, eax
call fcn.1002e550
test al, al
je 0x100417c9
push dword [ebp + 0x10]
lea ecx, [ebp - 0xac]
call fcn.1002daf0
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp - 0xac]
call fcn.1002d9f0
push eax
call esi
mov esi, eax
cmp esi, 0xffffffff
jne 0x10041730
lea ecx, [ebp - 0xac]
call fcn.1002d750
jmp 0x100419ad
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x2cc], eax
test eax, eax
jne 0x10041753
lea ecx, [ebp - 0xac]
call fcn.1002d750
jmp 0x100419ad
push 0x10108ee8
push eax
mov dword [ebp - 0x2d4], 0
call fcn.1009cd83
add esp, 8
mov dword [ebp - 0x2c8], eax
lea ecx, [ebp - 0x2d4]
push 0
push ecx
push dword [ebp - 0x2cc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x2d4]
cmp eax, dword [ebp - 0x2cc]
je 0x1004186e
push dword [ebp - 0x2c8]
call fcn.1009cb33
add esp, 4
mov dword [ebp - 0x2c8], 0
lea ecx, [ebp - 0xac]
call fcn.1002d750
jmp 0x100419ad
call fcn.10030be0
push eax
lea ecx, [ebp - 0xac]
call fcn.1002dad0
call fcn.10030e00
test al, al
je 0x100418f3
call fcn.10030bf0
mov edi, eax
test edi, edi
jne 0x10041808
lea ecx, [ebp - 0xac]
call fcn.1002d750
mov edi, dword [ebp - 0x2d0]
jmp 0x100419b3
xor eax, eax
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov eax, dword [ebp + 0x10]
mov edx, eax
mov dword [ebp - 0x14], 7
lea esi, [edx + 2]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x10041824
sub edx, esi
lea ecx, [ebp - 0x28]
sar edx, 1
push edx
push eax
call fcn.1002a6c2
lea eax, [ebp - 0x2c4]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x2d4]
push eax
lea eax, [ebp - 0x28]
push eax
push edi
call fcn.1009f6a0
add esp, 0x10
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
mov esi, eax
call fcn.10028df2
test esi, esi
jne 0x1004187e
lea ecx, [ebp - 0xac]
call fcn.1002d750
jmp 0x100419a7
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0x2cc], eax
test eax, eax
jne 0x1004189e
lea ecx, [ebp - 0xac]
call fcn.1002d750
jmp 0x100419a7
push 0x10108ee8
push eax
call fcn.1009cd83
push dword [ebp - 0x2cc]
mov dword [ebp - 0x2c8], eax
push eax
push dword [ebp - 0x2d4]
push edi
call fcn.1009f3f0
add esp, 0x18
test eax, eax
jne 0x1004186e
push 1
push dword [ebp - 0x2c8]
call fcn.1009c669
add esp, 8
mov dword [ebp - 0x2c8], 0
lea ecx, [ebp - 0xac]
call fcn.1002d750
jmp 0x100419a7
lea eax, [ebp - 0x2cc]
push eax
lea eax, [ebp - 0x2c8]
push eax
push dword [ebp + 0x10]
lea ecx, [ebp - 0xac]
call fcn.1002d9f0
push eax
call fcn.1009f8c0
add esp, 0x10
test eax, eax
jns 0x1004186e
lea ecx, [ebp - 0xac]
call fcn.1002d750
jmp 0x100419b3
push eax
push dword [ebp + 0x10]
call fcn.10030bc0
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x100419ad
push esi
call fcn.10030bc0
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
push esi
test edi, edi
je 0x100419a1
call fcn.10030bc0
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x2cc], eax
test eax, eax
je 0x100419a7
push 0x10108ee8
push eax
call fcn.1009cd83
add esp, 8
mov dword [ebp - 0x2c8], eax
push dword [ebp - 0x2cc]
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push dword [ebp - 0x2c8]
call fcn.100a2620
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov edi, dword [ebp - 0x2d0]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov eax, dword [ebp - 0x2c8]
test eax, eax
jne 0x10041a74
push eax
push 0x80
push 3
push eax
push 1
push SysReAllocString
push dword [ebp + 0x10]
call esi
mov esi, eax
cmp esi, 0xffffffff
je 0x10041a6a
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x2cc], eax
test eax, eax
je 0x10041a6a
push 0x10108ee8
push eax
mov dword [ebp - 0x2d4], 0
call fcn.1009cd83
add esp, 8
mov dword [ebp - 0x2c8], eax
lea ecx, [ebp - 0x2d4]
push 0
push ecx
push dword [ebp - 0x2cc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x2d4]
cmp eax, dword [ebp - 0x2cc]
je 0x10041a6a
push dword [ebp - 0x2c8]
call fcn.1009cb33
add esp, 4
xor eax, eax
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.1009cacf
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x2c8]
test eax, eax
je 0x10041a4c
mov dword [edi], eax
mov eax, dword [ebp - 0x2cc]
mov dword [ebx], eax
mov eax, 1
jmp 0x10041a4e