Function at 0x10011870
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x40
push esi
mov esi, dword [esp + 0x48]
test esi, esi
jne 0x10011883
xor eax, eax
pop esi
add esp, 0x40
ret
push edi
mov edi, dword [sym.imp.MSVCR90.dll_fread]
push esi
push 2
lea eax, [esp + 0x10]
push 1
push eax
call edi
mov ecx, dword [esp + 0x18]
push ecx
call sym.leptonlib.dll_convertOnBigEnd16
mov edx, 0x4d42
add esp, 0x14
cmp ax, dx
je 0x100118b5
pop edi
xor eax, eax
pop esi
add esp, 0x40
ret
push ebx
push ebp
push esi
push 2
lea eax, [esp + 0x18]
push 1
push eax
call edi
mov ecx, dword [esp + 0x20]
push ecx
call sym.leptonlib.dll_convertOnBigEnd16
push esi
push 2
lea edx, [esp + 0x2c]
push 1
push edx
call edi
mov eax, dword [esp + 0x34]
push eax
call sym.leptonlib.dll_convertOnBigEnd16
push esi
push 2
lea ecx, [esp + 0x40]
push 1
push ecx
call edi
mov edx, dword [esp + 0x48]
push edx
call sym.leptonlib.dll_convertOnBigEnd16
push esi
push 2
lea eax, [esp + 0x54]
push 1
push eax
call edi
mov ecx, dword [esp + 0x5c]
add esp, 0x4c
push ecx
call sym.leptonlib.dll_convertOnBigEnd16
push esi
push 2
lea edx, [esp + 0x1c]
push 1
push edx
call edi
mov eax, dword [esp + 0x24]
push eax
call sym.leptonlib.dll_convertOnBigEnd16
push esi
push 2
movzx ecx, ax
lea edx, [esp + 0x30]
push 1
push edx
mov dword [esp + 0x60], ecx
call edi
mov eax, dword [esp + 0x38]
push eax
call sym.leptonlib.dll_convertOnBigEnd16
push esi
push 4
lea ecx, [esp + 0x48]
push 1
push ecx
call edi
mov edx, dword [esp + 0x50]
push edx
call sym.leptonlib.dll_convertOnBigEnd32
add esp, 0x40
push esi
push 4
lea eax, [esp + 0x1c]
push 1
push eax
call edi
mov ecx, dword [esp + 0x24]
push ecx
call sym.leptonlib.dll_convertOnBigEnd32
mov ebp, eax
mov dword [esp + 0x40], ebp
push esi
push 4
lea edx, [esp + 0x30]
push 1
push edx
call edi
mov eax, dword [esp + 0x38]
push eax
call sym.leptonlib.dll_convertOnBigEnd32
push esi
push 2
lea ecx, [esp + 0x40]
push 1
push ecx
mov dword [esp + 0x54], eax
call edi
mov edx, dword [esp + 0x48]
push edx
call sym.leptonlib.dll_convertOnBigEnd16
push esi
push 2
lea eax, [esp + 0x54]
push 1
push eax
call edi
mov ecx, dword [esp + 0x5c]
add esp, 0x4c
push ecx
call sym.leptonlib.dll_convertOnBigEnd16
push esi
movzx edx, ax
push 4
lea eax, [esp + 0x20]
push 1
push eax
mov dword [esp + 0x38], edx
call edi
mov ecx, dword [esp + 0x28]
push ecx
call sym.leptonlib.dll_convertOnBigEnd32
push esi
push 4
lea edx, [esp + 0x34]
push 1
push edx
mov ebx, eax
call edi
mov eax, dword [esp + 0x3c]
push eax
call sym.leptonlib.dll_convertOnBigEnd32
push esi
push 4
lea ecx, [esp + 0x48]
push 1
push ecx
mov dword [esp + 0x90], eax
call edi
mov edx, dword [esp + 0x50]
push edx
call sym.leptonlib.dll_convertOnBigEnd32
add esp, 0x40
push esi
push 4
mov dword [esp + 0x38], eax
lea eax, [esp + 0x1c]
push 1
push eax
call edi
mov ecx, dword [esp + 0x24]
push ecx
call sym.leptonlib.dll_convertOnBigEnd32
push esi
push 4
lea edx, [esp + 0x30]
push 1
push edx
mov dword [esp + 0x64], eax
call edi
mov eax, dword [esp + 0x38]
push eax
call sym.leptonlib.dll_convertOnBigEnd32
push esi
push 4
lea ecx, [esp + 0x44]
push 1
push ecx
call edi
mov edx, dword [esp + 0x4c]
push edx
call sym.leptonlib.dll_convertOnBigEnd32
add esp, 0x3c
test ebx, ebx
jne 0x10011b06
cmp ebp, 1
jl 0x10011b06
mov ecx, dword [esp + 0x1c]
cmp ecx, 1
jl 0x10011b06
mov eax, dword [esp + 0x24]
lea edx, [eax - 1]
cmp dx, 0x1f
ja 0x10011b06
cwde
imul eax, ebp
add eax, 0x1f
cdq
and edx, 0x1f
add eax, edx
mov ebx, eax
sar ebx, 5
add ebx, ebx
add ebx, ebx
mov eax, ebx
imul eax, ecx
cmp dword [esp + 0x54], eax
jne 0x10011b06
mov eax, dword [esp + 0x38]
cmp ax, 0x36
jb 0x10011b06
mov ecx, 0x436
cmp ax, cx
ja 0x10011b06
movsx ebp, ax
mov dword [esp + 0x4c], ebp
add ebp, 0xffffffca
shr ebp, 2
test ebp, ebp
jle 0x10011b10
push 4
push ebp
call dword [sym.imp.MSVCR90.dll_calloc]
add esp, 8
mov dword [esp + 0x34], eax
test eax, eax
je 0x10011b06
push esi
push ebp
push 4
push eax
call edi
add esp, 0x10
cmp eax, ebp
je 0x10011b10
mov edx, dword [esp + 0x34]
push edx
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x40
ret
mov eax, dword [esp + 0x24]
movzx ecx, ax
mov dword [esp + 0x28], ecx
cmp ax, 0x18
jne 0x10011b29
mov dword [esp + 0x28], 0x20
movsx eax, word [esp + 0x28]
mov edx, dword [esp + 0x1c]
push eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x30]
push edx
push eax
call sym.leptonlib.dll_pixCreate
mov ecx, eax
add esp, 0xc
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x10011b06
fild dword [esp + 0x30]
fnstcw word [esp + 0x54]
fdiv qword [0x10143190]
movzx eax, word [esp + 0x54]
or eax, 0xc00
mov dword [esp + 0x38], eax
fadd qword [0x10142230]
fldcw word [esp + 0x38]
fistp qword [esp + 0x38]
mov edx, dword [esp + 0x38]
push edx
push ecx
fldcw word [esp + 0x5c]
call sym.leptonlib.dll_pixSetXRes
mov ecx, dword [esp + 0x20]
fild dword [esp + 0x48]
fnstcw word [esp + 0x5c]
fdiv qword [0x10143190]
movzx eax, word [esp + 0x5c]
or eax, 0xc00
mov dword [esp + 0x48], eax
fadd qword [0x10142230]
fldcw word [esp + 0x48]
fistp qword [esp + 0x48]
mov eax, dword [esp + 0x48]
push eax
push ecx
fldcw word [esp + 0x64]
call sym.leptonlib.dll_dpixSetData
mov edx, dword [esp + 0x28]
push edx
call sym.leptonlib.dll_dpixGetRefcount
mov dword [esp + 0x54], eax
add eax, eax
add eax, eax
add esp, 0x14
mov dword [esp + 0x30], eax
mov dword [esp + 0x54], 0
test ebp, ebp
jle 0x10011c2a
mov eax, 8
cmp word [esp + 0x28], ax
jge 0x10011bfa
mov eax, dword [esp + 0x48]
push eax
call sym.leptonlib.dll_pixcmapCreate
mov ecx, dword [eax]
push ecx
mov dword [esp + 0x5c], eax
call dword [sym.imp.MSVCR90.dll_free]
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x5c]
add esp, 8
cmp ebp, 0x100
mov dword [eax], edx
jl 0x10011c27
mov ebp, 0x100
mov dword [eax + 0xc], ebp
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call sym.leptonlib.dll_pixSetColormap
mov edx, dword [esp + 0x54]
push 0
push edx
push esi
call dword [sym.imp.MSVCR90.dll_fseek]
add esp, 0x14
cmp word [esp + 0x24], 0x18
je 0x10011cbd
mov eax, dword [esp + 0x18]
push eax
call sym.leptonlib.dll_pixGetData
mov ebp, eax
mov eax, dword [esp + 0x20]
lea ecx, [eax - 1]
imul ecx, dword [esp + 0x34]
add esp, 4
add ebp, ecx
mov dword [esp + 0x34], 0
test eax, eax
jle 0x10011d86
nop
push esi
push ebx
push 1
push ebp
call edi
add esp, 0x10
cmp eax, ebx
jne 0x10011ca6
mov eax, dword [esp + 0x34]
sub ebp, dword [esp + 0x30]
inc eax
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x34], eax
jl 0x10011c80
jmp 0x10011d86
lea edx, [esp + 0x18]
push edx
call sym.leptonlib.dll_pixDestroy
add esp, 4
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x40
ret
mov ebp, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
lea eax, [ebp + ebp*2]
sub ebx, eax
push ecx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], ebx
call sym.leptonlib.dll_pixGetData
mov ecx, dword [esp + 0x20]
lea edx, [ecx - 1]
imul edx, dword [esp + 0x44]
add esp, 4
lea eax, [eax + edx*4]
test ecx, ecx
jle 0x10011d86
add eax, 2
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], ecx
test ebp, ebp
jle 0x10011d48
mov ebx, eax
push esi
push 3
lea eax, [esp + 0x28]
push 1
push eax
call edi
add esp, 0x10
cmp eax, 3
je 0x10011d24
mov dword [esp + 0x38], 1
mov cl, byte [esp + 0x22]
mov byte [ebx - 2], cl
mov dl, byte [esp + 0x21]
mov byte [ebx - 1], dl
mov al, byte [esp + 0x20]
mov byte [ebx], al
add ebx, 4
sub ebp, 1
jne 0x10011d08
mov ebp, dword [esp + 0x2c]
mov ebx, dword [esp + 0x34]
test ebx, ebx
jle 0x10011d68
lea esp, [esp]
push esi
push 1
lea ecx, [esp + 0x28]
push 1
push ecx
call edi
add esp, 0x10
sub ebx, 1
jne 0x10011d50
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x28]
sub eax, dword [esp + 0x30]
sub dword [esp + 0x1c], 1
mov dword [esp + 0x28], eax
jne 0x10011d02
cmp dword [esp + 0x38], 0
jne 0x10011ca6
mov eax, dword [esp + 0x18]
push eax
call sym.leptonlib.dll_pixEndianByteSwap
add esp, 4
cmp word [esp + 0x24], 1
jne 0x10011dc7
cmp dword [esp + 0x54], 0
je 0x10011dc7
mov ecx, dword [esp + 0x18]
push 3
push ecx
call sym.leptonlib.dll_pixRemoveColormap
lea edx, [esp + 0x20]
push edx
mov esi, eax
call sym.leptonlib.dll_pixDestroy
add esp, 0xc
pop ebp
pop ebx
pop edi
mov eax, esi
pop esi
add esp, 0x40
ret
mov eax, dword [esp + 0x18]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x40
ret