Function at 0x403960
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x54
mov eax, dword [esp + 0x5c]
push ebx
push ebp
push esi
push edi
push 0
push 1
push 3
mov dword [esp + 0x1c], ecx
mov dword [ecx + 8], eax
mov ecx, dword [esp + 0x74]
push 0
push 1
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
test ebx, ebx
jne 0x40399e
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x54
ret 8
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x68]
push 0
push edx
lea eax, [esp + 0x24]
push 0xe
push eax
push ebx
call edi
lea ecx, [esp + 0x68]
push 0
push ecx
lea edx, [esp + 0x44]
push 0x28
push edx
push ebx
call edi
mov cl, byte [esp + 0x4a]
mov eax, 1
shl eax, cl
lea ecx, [eax*4 + 0x28]
push ecx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, dword [esp + 0x3c]
mov esi, eax
push 0
mov dword [esi], edx
mov eax, dword [esp + 0x44]
mov dword [esi + 4], eax
mov ecx, dword [esp + 0x48]
mov dword [esi + 8], ecx
mov dx, word [esp + 0x4c]
mov word [esi + 0xc], dx
mov ax, word [esp + 0x4e]
mov word [esi + 0xe], ax
mov ecx, dword [esp + 0x50]
mov dword [esi + 0x10], ecx
mov edx, dword [esp + 0x54]
mov dword [esi + 0x14], edx
mov eax, dword [esp + 0x58]
mov dword [esi + 0x18], eax
mov ecx, dword [esp + 0x5c]
mov dword [esi + 0x1c], ecx
mov edx, dword [esp + 0x60]
mov dword [esi + 0x20], edx
mov eax, dword [esp + 0x64]
lea ecx, [esp + 0x6c]
mov dword [esi + 0x24], eax
push ecx
mov cl, byte [esp + 0x52]
mov edx, 1
lea ebp, [esi + 0x28]
shl edx, cl
shl edx, 2
push edx
push ebp
push ebx
call edi
push 0x408
call fcn.00405e80
mov edi, eax
mov ecx, 0x100
mov eax, ebp
add esp, 4
mov word [edi], 0x300
mov word [edi + 2], cx
lea ebp, [edi + 5]
mov dl, byte [eax]
inc eax
mov byte [ebp - 1], dl
add ebp, 4
mov dl, byte [eax]
inc eax
mov byte [ebp - 4], dl
mov dl, byte [eax]
inc eax
mov byte [ebp - 3], dl
mov dl, byte [eax]
inc eax
mov byte [ebp - 2], dl
dec ecx
jne 0x403a7d
push edi
call dword [sym.imp.GDI32.dll_CreatePalette]
mov ebp, dword [esp + 0x10]
push edi
mov dword [ebp + 4], eax
call fcn.00405ede
mov eax, dword [esp + 0x22]
mov ecx, dword [esp + 0x2a]
add esp, 4
sub eax, ecx
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, dword [esp + 0x1e]
lea ecx, [esp + 0x68]
push 0
push ecx
mov ecx, dword [esp + 0x2e]
mov dword [esp + 0x18], eax
sub edx, ecx
push edx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x6c]
push eax
call dword [sym.imp.USER32.dll_GetDC]
mov ecx, dword [ebp + 4]
mov edi, eax
push 0
push ecx
push edi
call dword [sym.imp.GDI32.dll_SelectPalette]
test eax, eax
jne 0x403b18
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x54
ret 8
push edi
call dword [sym.imp.GDI32.dll_RealizePalette]
cmp eax, 0xffffffff
jne 0x403b30
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x54
ret 8
mov edx, dword [esp + 0x10]
push 0
push esi
push edx
lea eax, [esp + 0x48]
push 4
push eax
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
push edi
mov edi, dword [esp + 0x70]
push edi
mov dword [ebp], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
cmp dword [ebp], 0
jne 0x403b67
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x54
ret 8
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ecx
call esi
mov edx, dword [esp + 0x18]
push edx
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp], 0
jne 0x403b94
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x54
ret 8
lea eax, [esp + 0x2c]
push eax
push edi
call dword [sym.imp.USER32.dll_GetClientRect]
lea ecx, [esp + 0x2c]
push 1
push ecx
push edi
call dword [sym.imp.USER32.dll_InvalidateRect]
push edi
call dword [sym.imp.USER32.dll_UpdateWindow]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x54
ret 8