Function at 0x41f050
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x478ed1
mov eax, dword fs:[0]
push eax
sub esp, 0x3d4
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 ebx, dword [ebp + 8]
lea eax, [ebp - 0xa0]
push 0x84
xor edi, edi
mov dword [ebp - 0x14], ebx
push edi
push eax
xor esi, esi
call fcn.004619b0
add esp, 0xc
call fcn.00405fd0
push eax
lea ecx, [ebp - 0xa0]
call fcn.0040b940
mov dword [ebp - 4], edi
call fcn.00405fe0
mov ecx, eax
call fcn.0040c970
test al, al
je 0x41f186
push ebx
lea ecx, [ebp - 0xa0]
call fcn.0040bf60
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
lea ecx, [ebp - 0xa0]
call fcn.0040beb0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x41f10d
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], eax
call fcn.0040bba0
jmp 0x41f3a9
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
jne 0x41f133
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], 0xffffffff
call fcn.0040bba0
jmp 0x41f3a9
push edi
mov dword [ebp - 0x18], 0
call fcn.0045ed50
add esp, 4
mov esi, eax
lea eax, [ebp - 0x18]
push 0
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], edi
je 0x41f393
push esi
call fcn.0045ed0d
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa0]
xor esi, esi
call fcn.0040bba0
jmp 0x41f3a9
call fcn.00405fe0
push eax
lea ecx, [ebp - 0xa0]
call fcn.0040bf40
call fcn.00406370
test al, al
je 0x41f1ac
call fcn.00405ff0
mov ebx, eax
jmp 0x41f286
push 0x84
lea eax, [ebp - 0x1a8]
push 0
push eax
call fcn.004619b0
add esp, 0xc
call fcn.00406000
push eax
lea ecx, [ebp - 0x1a8]
call fcn.0040b940
lea ecx, [ebp - 0x1a8]
mov byte [ebp - 4], 1
call fcn.0040beb0
mov dword [ebp - 0x3e0], eax
test eax, eax
je 0x41f247
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x3dc], eax
inc eax
push eax
mov dword [ebp - 0x18], eax
call fcn.0045ed50
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x41f247
push dword [ebp - 0x18]
push 0
push ebx
call fcn.004619b0
add esp, 0xc
push 0
push 0
push dword [ebp - 0x3dc]
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x3e0]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
jmp 0x41f249
xor ebx, ebx
push ebx
lea ecx, [ebp - 0xa0]
call fcn.0040beb0
push eax
call fcn.0040e2d0
add esp, 8
mov dword [ebp - 0x3e0], eax
test ebx, ebx
je 0x41f271
push ebx
call fcn.0045ed0d
add esp, 4
lea ecx, [ebp - 0x1a8]
mov byte [ebp - 4], 0
call fcn.0040bba0
mov ebx, dword [ebp - 0x3e0]
test ebx, ebx
jne 0x41f2a1
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], 0xffffffff
call fcn.0040bba0
jmp 0x41f3a9
push 0x84
lea eax, [ebp - 0x124]
mov dword [ebp - 0x1c], 0
push 0
push eax
call fcn.004619b0
add esp, 0xc
lea ecx, [ebp - 0x124]
push 0xffffffffffffffff
push dword [ebp - 0x14]
call fcn.0040ba10
push 0x47c770
push 0x47c774
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 2
call fcn.0040cc70
lea eax, [ebp - 0x3d8]
push eax
lea eax, [ebp - 0x1c]
push eax
push 1
lea ecx, [ebp - 0x124]
call fcn.0040beb0
push eax
push ebx
call fcn.0040da10
add esp, 0x14
test eax, eax
je 0x41f32c
lea ecx, [ebp - 0x124]
call fcn.0040bba0
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], 0xffffffff
call fcn.0040bba0
jmp 0x41f3a9
mov edi, dword [ebp - 0x1ac]
test edi, edi
je 0x41f30d
push edi
call fcn.0045ed50
push edi
mov esi, eax
push esi
push dword [ebp - 0x1c]
push ebx
call fcn.0040e8d0
add esp, 0x14
test eax, eax
je 0x41f376
cmp eax, 0x600
je 0x41f376
push esi
call fcn.0045ed0d
add esp, 4
xor esi, esi
call fcn.00406370
test al, al
jne 0x41f30d
push ebx
call fcn.0040d570
add esp, 4
jmp 0x41f30d
call fcn.00406370
test al, al
jne 0x41f388
push ebx
call fcn.0040d570
add esp, 4
lea ecx, [ebp - 0x124]
call fcn.0040bba0
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], 0xffffffff
call fcn.0040bba0
test esi, esi
jne 0x41f41a
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x41f412
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x41f412
push edi
mov dword [ebp - 0x14], 0
call fcn.0045ed50
add esp, 4
mov esi, eax
lea eax, [ebp - 0x14]
push 0
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], edi
je 0x41f412
push esi
call fcn.0045ed0d
add esp, 4
xor esi, esi
test esi, esi
je 0x41f4c3
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push edi
push esi
push eax
call fcn.00460eb0
add esp, 0xc
mov dword [ebp - 0x3dc], 0
lea eax, [ebp - 0x3dc]
push eax
push 1
push ebx
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov eax, dword [ebp - 0x3dc]
push 0x10
mov dword [ebp - 0x3e0], eax
call sub.gdiplus.dll_GdipAlloc
mov edi, eax
test edi, edi
je 0x41f4a1
lea eax, [edi + 4]
mov dword [edi + 8], 0
push eax
push dword [ebp - 0x3e0]
mov dword [edi + 0xc], 0
mov dword [edi], vtable.Gdiplus::Image.0
mov dword [eax], 0
call sub.gdiplus.dll_GdipLoadImageFromStream
mov dword [edi + 8], eax
mov dword [edi + 8], 0
test eax, eax
je 0x41f4b6
mov eax, dword [ebp - 0x3dc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
xor edi, edi
push esi
call fcn.0045ed0d
add esp, 4
mov eax, edi
jmp 0x41f4c5
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.0045ecfc
mov esp, ebp
pop ebp
ret