Function at 0x1005f220
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x34
push edi
mov edi, dword [esp + 0x40]
test edi, edi
je 0x1005f5fd
push edi
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
cmp eax, 8
jne 0x1005f5fd
fld dword [esp + 0x48]
fcomp qword [0x10145568]
fnstsw ax
test ah, 5
jp 0x1005f25d
fld dword [0x101439a4]
fstp dword [esp + 0x48]
cmp dword [esp + 0x4c], 2
jge 0x1005f26c
mov dword [esp + 0x4c], 0xa
push ebx
mov ebx, dword [esp + 0x40]
push esi
mov esi, dword [esp + 0x4c]
test ebx, ebx
je 0x1005f382
test esi, esi
je 0x1005f38a
push ebp
push 0
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x18]
push ecx
push edi
call sym.leptonlib.dll_pixGetDimensions
add esp, 0x10
test ebx, ebx
je 0x1005f41a
push esi
call sym.leptonlib.dll_numaGetRefcount
add esp, 4
cmp eax, 1
jne 0x1005f410
push ebx
call sym.leptonlib.dll_pixGetColormap
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x1005f410
push 0
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x3c]
push eax
push ebx
call sym.leptonlib.dll_pixGetDimensions
mov ecx, dword [esp + 0x20]
add esp, 0x10
cmp ecx, dword [esp + 0x34]
jne 0x1005f410
mov edx, dword [esp + 0x4c]
cmp edx, dword [esp + 0x38]
jne 0x1005f410
push ebp
call sym.leptonlib.dll_ccbaGetCount
fild dword [esp + 0x5c]
add esp, 4
mov dword [esp + 0x30], eax
fdivr qword [0x10145560]
call fcn.10140710
mov ecx, dword [esp + 0x30]
sub ecx, eax
push ecx
push str.nestim___d_n
mov dword [esp + 0x38], ecx
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
cmp dword [esp + 0x30], 0xff
jg 0x1005f410
push 0
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x24]
push ecx
push esi
call sym.leptonlib.dll_pixGetDimensions
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x5c]
add esp, 0x10
cmp eax, dword [esp + 0x1c]
jne 0x1005f393
cmp ecx, dword [esp + 0x24]
jne 0x1005f393
push esi
call sym.leptonlib.dll_boxClone
add esp, 4
mov dword [esp + 0x14], eax
jmp 0x1005f439
test esi, esi
je 0x1005f286
pop esi
pop ebx
xor eax, eax
pop edi
add esp, 0x34
ret
push 1
push ecx
push eax
call sym.leptonlib.dll_pixCreateNoInit
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
push 0
push 0
push esi
push 0x18
push edx
push ecx
push 0
push 0
push eax
mov dword [esp + 0x44], eax
call sym.leptonlib.dll_pixRasterop
mov edx, dword [esp + 0x7c]
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x40]
push 0
push 0
push 0
push 0x1e
push edx
mov edx, dword [esp + 0x58]
sub ecx, eax
push ecx
push 0
push eax
push edx
call sym.leptonlib.dll_pixRasterop
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0x70]
add esp, 0x54
push 0
push 0
push 0
push 0x1e
sub ecx, eax
push ecx
push edx
push eax
mov eax, dword [esp + 0x30]
push 0
push eax
call sym.leptonlib.dll_pixRasterop
add esp, 0x24
jmp 0x1005f439
pop ebp
pop esi
pop ebx
xor eax, eax
pop edi
add esp, 0x34
ret
push edi
call sym.leptonlib.dll_pixCreateTemplate
mov ebx, eax
push 8
mov dword [esp + 0x50], ebx
call sym.leptonlib.dll_pixcmapCreate
mov ebp, eax
push ebp
push ebx
call sym.leptonlib.dll_pixSetColormap
add esp, 0x10
push 1
push 0
push 0
push esi
push edi
call sym.leptonlib.dll_pixGetGrayHistogramMasked
fld dword [esp + 0x68]
mov edx, dword [esp + 0x6c]
add esp, 0x14
lea ecx, [esp + 0x20]
push ecx
push edx
push ecx
fstp dword [esp]
push ebp
mov dword [esp + 0x4c], eax
call fcn.1005e860
lea eax, [esp + 0x4c]
push eax
call sym.leptonlib.dll_numaDestroy
push edi
call sym.leptonlib.dll_pixGetData
push ebx
mov ebp, eax
call sym.leptonlib.dll_pixGetData
push edi
mov ebx, eax
call sym.leptonlib.dll_dpixGetRefcount
mov ecx, dword [esp + 0x68]
push ecx
mov edi, eax
call sym.leptonlib.dll_dpixGetRefcount
add esp, 0x24
mov dword [esp + 0x30], eax
test esi, esi
jne 0x1005f523
cmp dword [esp + 0x4c], esi
mov dword [esp + 0x18], esi
jle 0x1005f509
lea edx, [eax*4]
lea eax, [edi*4]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x30], edx
mov edi, ebp
xor esi, esi
test eax, eax
jle 0x1005f4f2
lea esp, [esp]
push esi
push edi
call sym.leptonlib.dll_l_getDataByte
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx + eax*4]
push edx
push esi
push ebx
call sym.leptonlib.dll_l_setDataByte
mov eax, dword [esp + 0x24]
inc esi
add esp, 0x14
cmp esi, eax
jl 0x1005f4d0
mov ecx, dword [esp + 0x18]
add edi, dword [esp + 0x28]
add ebx, dword [esp + 0x30]
inc ecx
cmp ecx, dword [esp + 0x4c]
mov dword [esp + 0x18], ecx
jl 0x1005f4c6
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.MSVCR90.dll_free]
mov eax, dword [esp + 0x4c]
add esp, 4
pop ebp
pop esi
pop ebx
pop edi
add esp, 0x34
ret
mov ecx, dword [esp + 0x14]
push ecx
call sym.leptonlib.dll_pixGetData
mov edx, dword [esp + 0x18]
push edx
mov esi, eax
call sym.leptonlib.dll_dpixGetRefcount
add esp, 8
cmp dword [esp + 0x4c], 0
mov dword [esp + 0x18], 0
jle 0x1005f5d9
mov ecx, dword [esp + 0x30]
add eax, eax
lea edx, [ecx*4]
add eax, eax
lea ecx, [edi*4]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x30], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], esi
mov edi, ebp
jmp 0x1005f580
xor esi, esi
test eax, eax
jle 0x1005f5ba
mov edx, dword [esp + 0x2c]
push esi
push edx
call sym.leptonlib.dll_l_getDataBit
add esp, 8
test eax, eax
je 0x1005f5b1
push esi
push edi
call sym.leptonlib.dll_l_getDataByte
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx + eax*4]
push edx
push esi
push ebx
call sym.leptonlib.dll_l_setDataByte
add esp, 0x14
mov eax, dword [esp + 0x10]
inc esi
cmp esi, eax
jl 0x1005f586
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x40]
add edi, dword [esp + 0x28]
add dword [esp + 0x2c], edx
add ebx, dword [esp + 0x30]
inc ecx
cmp ecx, dword [esp + 0x4c]
mov dword [esp + 0x18], ecx
jl 0x1005f580
lea eax, [esp + 0x14]
push eax
call sym.leptonlib.dll_pixDestroy
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.MSVCR90.dll_free]
mov eax, dword [esp + 0x50]
add esp, 8
pop ebp
pop esi
pop ebx
pop edi
add esp, 0x34
ret
xor eax, eax
pop edi
add esp, 0x34
ret