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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x479076
mov eax, dword fs:[0]
push eax
sub esp, 0x4c4
mov eax, dword [0x49a324]
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 + 0xc]
mov esi, dword [ebp + 0x14]
test edi, edi
jne 0x42015a
push 0x84
lea eax, [ebp - 0xcc]
push edi
push eax
call fcn.00461a60
add esp, 0xc
call fcn.00406040
push eax
lea ecx, [ebp - 0xcc]
call fcn.0040b9c0
mov dword [ebp - 4], edi
call fcn.00406050
mov ecx, eax
call fcn.0040c9f0
test al, al
je 0x41ff8c
push dword [ebp + 8]
lea ecx, [ebp - 0xcc]
call fcn.0040bfe0
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
lea ecx, [ebp - 0xcc]
call fcn.0040bf30
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x41ff13
lea ecx, [ebp - 0xcc]
mov dword [ebp - 4], eax
call fcn.0040bc20
jmp 0x4201cf
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push ebx
call edi
mov esi, eax
test esi, esi
jne 0x41ff3b
lea ecx, [ebp - 0xcc]
mov dword [ebp - 4], 0xffffffff
call fcn.0040bc20
jmp 0x4201d5
push esi
mov dword [ebp - 0x18], 0
call fcn.0045ee00
add esp, 4
mov edi, eax
lea eax, [ebp - 0x18]
push 0
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], esi
je 0x420146
push edi
call fcn.0045edbd
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xcc]
call fcn.0040bc20
jmp 0x4201cf
call fcn.00406050
push eax
lea ecx, [ebp - 0xcc]
call fcn.0040bfc0
push 0x84
lea eax, [ebp - 0x1d4]
push 0
push eax
call fcn.00461a60
add esp, 0xc
call fcn.00406070
push eax
lea ecx, [ebp - 0x1d4]
call fcn.0040b9c0
mov byte [ebp - 4], 1
call fcn.004063e0
test al, al
je 0x41ffda
call fcn.00406060
mov ebx, eax
jmp 0x420016
push 0
lea ecx, [ebp - 0x1d4]
call fcn.0040bf30
push eax
call fcn.0042c7a0
add esp, 8
lea ecx, [ebp - 0xcc]
mov esi, eax
push esi
call fcn.0040bf30
push eax
call fcn.0040e350
add esp, 8
mov ebx, eax
test esi, esi
je 0x420016
push esi
call fcn.0045edbd
add esp, 4
test ebx, ebx
jne 0x42003c
lea ecx, [ebp - 0x1d4]
call fcn.0040bc20
lea ecx, [ebp - 0xcc]
mov dword [ebp - 4], 0xffffffff
call fcn.0040bc20
jmp 0x4201cf
push 0x84
lea eax, [ebp - 0x150]
mov dword [ebp - 0x1c], 0
push 0
push eax
call fcn.00461a60
add esp, 0xc
lea ecx, [ebp - 0x150]
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040ba90
push 0x47c770
push 0x47c774
lea ecx, [ebp - 0x150]
mov byte [ebp - 4], 2
call fcn.0040ccf0
lea eax, [ebp - 0x4bc]
push eax
lea eax, [ebp - 0x1c]
push eax
push 1
lea ecx, [ebp - 0x150]
call fcn.0040bf30
push eax
push ebx
call fcn.0040da90
add esp, 0x14
test eax, eax
je 0x4200b8
lea ecx, [ebp - 0x150]
call fcn.0040bc20
jmp 0x42001a
mov esi, dword [ebp - 0x290]
test esi, esi
jne 0x4200d2
lea ecx, [ebp - 0x150]
call fcn.0040bc20
jmp 0x42001a
push esi
call fcn.0045ee00
push esi
mov edi, eax
push edi
push dword [ebp - 0x1c]
push ebx
call fcn.0040e950
add esp, 0x14
test eax, eax
je 0x42011e
cmp eax, 0x600
je 0x42011e
push edi
call fcn.0045edbd
add esp, 4
call fcn.004063e0
test al, al
jne 0x42010e
push ebx
call fcn.0040d5f0
add esp, 4
lea ecx, [ebp - 0x150]
call fcn.0040bc20
jmp 0x42001a
call fcn.004063e0
test al, al
jne 0x420130
push ebx
call fcn.0040d5f0
add esp, 4
lea ecx, [ebp - 0x150]
call fcn.0040bc20
lea ecx, [ebp - 0x1d4]
call fcn.0040bc20
lea ecx, [ebp - 0xcc]
mov dword [ebp - 4], 0xffffffff
call fcn.0040bc20
jmp 0x4201c7
test esi, esi
jne 0x420165
call fcn.00406030
mov esi, eax
push edi
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x4201cf
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x4cc], eax
push ebx
test eax, eax
jne 0x420191
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x4201cf
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
je 0x4201cf
push esi
call fcn.0045ee00
add esp, 4
mov edi, eax
push esi
push dword [ebp - 0x4cc]
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.00460f60
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
test edi, edi
jne 0x42025a
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x420238
push 0
push ebx
call edi
mov esi, eax
test esi, esi
je 0x420238
push esi
mov dword [ebp - 0x14], 0
call fcn.0045ee00
add esp, 4
mov edi, eax
lea eax, [ebp - 0x14]
push 0
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], esi
je 0x420256
push edi
call fcn.0045edbd
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.0045edac
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x420238
lea eax, [esi + edi]
mov dword [ebp - 0x27c], 0
mov dword [ebp - 0x1d8], eax
mov dword [ebp - 0x1e0], eax
lea eax, [ebp - 0x4c8]
push 4
push eax
lea eax, [ebp - 0x4cc]
mov dword [ebp - 0x26c], 0
push eax
lea eax, [ebp - 0x4d0]
mov dword [ebp - 0x1dc], edi
push eax
lea eax, [ebp - 0x28c]
mov dword [ebp - 0x1e4], edi
push eax
call fcn.00427010
mov ebx, eax
push edi
mov dword [ebp - 0x4c8], ebx
call fcn.0045edbd
add esp, 0x18
test ebx, ebx
je 0x420238
mov edi, dword [ebp - 0x4d0]
xorps xmm0, xmm0
mov eax, dword [ebp - 0x4cc]
mov ebx, edi
imul ebx, dword [ebp - 0x4cc]
neg eax
mov dword [ebp - 0x40], eax
push 0
push 0
movlpd qword [ebp - 0x30], xmm0
movlpd qword [ebp - 0x28], xmm0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x48], 0x28
lea eax, [ebx*4]
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x4c0]
push eax
push 0
lea eax, [ebp - 0x48]
mov dword [ebp - 0x3c], 0x200001
push eax
push 0
mov dword [ebp - 0x38], 0
mov byte [ebp - 0x4c1], 0
mov dword [ebp - 0x4c0], 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x420238
xor esi, esi
test ebx, ebx
jle 0x420455
mov edx, dword [ebp - 0x4c8]
nop word [eax + eax]
mov eax, dword [ebp - 0x4c0]
mov cl, byte [edx + esi*4 + 3]
mov byte [eax + esi*4 + 3], cl
mov eax, dword [ebp - 0x4c0]
cmp byte [eax + esi*4 + 3], 0xff
lea edi, [eax + esi*4]
jae 0x4203e9
movzx eax, byte [edx + esi*4 + 3]
movzx ecx, byte [edx + esi*4 + 2]
imul ecx, eax
mov eax, 0x80808081
mov byte [ebp - 0x4c1], 1
mul ecx
shr edx, 7
mov byte [edi], dl
mov edi, dword [ebp - 0x4c8]
movzx eax, byte [edi + esi*4 + 3]
movzx ecx, byte [edi + esi*4 + 1]
imul ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, dword [ebp - 0x4c0]
shr edx, 7
mov byte [eax + esi*4 + 1], dl
movzx eax, byte [edi + esi*4 + 3]
movzx ecx, byte [edi + esi*4]
imul ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, dword [ebp - 0x4c0]
shr edx, 7
mov byte [eax + esi*4 + 2], dl
mov edx, edi
jmp 0x42040c
mov al, byte [edx + esi*4 + 2]
mov byte [edi], al
mov eax, dword [ebp - 0x4c0]
movzx ecx, byte [edx + esi*4 + 1]
mov byte [eax + esi*4 + 1], cl
mov eax, dword [ebp - 0x4c0]
movzx ecx, byte [edx + esi*4]
mov byte [eax + esi*4 + 2], cl
mov eax, dword [ebp - 0x4c0]
mov ecx, dword [ebp + 0x10]
cmp dword [eax + esi*4], ecx
jne 0x420446
mov byte [eax + esi*4], 0
mov eax, dword [ebp - 0x4c0]
mov byte [ebp - 0x4c1], 1
mov byte [eax + esi*4 + 1], 0
mov eax, dword [ebp - 0x4c0]
mov byte [eax + esi*4 + 2], 0
mov eax, dword [ebp - 0x4c0]
mov byte [eax + esi*4 + 3], 0
inc esi
cmp esi, ebx
jl 0x420360
mov edi, dword [ebp - 0x4d0]
push dword [ebp - 0x4c8]
call fcn.00463e3a
push 0xa0
call fcn.0045edc2
mov esi, eax
add esp, 8
mov dword [ebp - 0x4d0], esi
mov dword [ebp - 4], 3
test esi, esi
je 0x42048a
lea ecx, [esi + 0x18]
call fcn.0040bac0
jmp 0x42048c
xor esi, esi
mov eax, dword [ebp - 0x14]
mov dword [esi], eax
mov eax, dword [ebp - 0x4cc]
mov dword [esi + 0x10], eax
mov al, byte [ebp - 0x4c1]
mov byte [esi + 0x14], al
mov eax, esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], edi
jmp 0x42023a