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

Disassembly:
sub esp, 0x7c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x90]
lea eax, [esp + 0x3c]
push 0
push eax
mov ecx, dword [edi]
push 0
push ecx
call fcn.10084750
mov edx, dword [esp + 0xa0]
mov eax, dword [edx]
mov dword [esp + 0x6c], eax
mov ecx, dword [edx + 4]
mov eax, dword [edx + 8]
mov dword [esp + 0x74], eax
mov esi, dword [edx + 0xc]
mov edx, dword [esp + 0xa4]
mov dword [esp + 0x78], esi
sub esi, ecx
mov ebx, dword [edx]
mov ebp, dword [edx + 4]
mov eax, dword [edx + 8]
mov dword [esp + 0x64], eax
mov eax, dword [edi + 0x78]
mov edx, dword [edx + 0xc]
mov dword [esp + 0x68], edx
mov edx, dword [edi + 0x70]
sub eax, edx
mov dword [esp + 0x1c], eax
mov eax, dword [edi]
push eax
call sym.GEAR32PO.OCX_GPb_height_get
sub eax, ebp
dec eax
mov dword [esp + 0x60], eax
call fcn.100a0c60
mov ecx, dword [edi]
mov dword [esp + 0x24], eax
push ecx
call sym.GEAR32PO.OCX_GPb_width_get
mov edx, dword [edi + 0x80]
mov dword [esp + 0x44], eax
mov eax, dword [edi + 0x7c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x48], edx
mov ebp, dword [eax + ebx*4]
xor edx, edx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x58], 0
lea eax, [ebp + esi]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x64]
sub eax, ebx
mov dword [esp + 0x38], ebp
inc eax
mov dword [esp + 0x2c], 2
div esi
fild qword [esp + 0x54]
fmul qword [0x100fc0d0]
fstp qword [esp + 0x54]
lea edx, [esp + 0x7c]
mov dword [esp + 0x20], edx
mov ebx, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x10], ebx
cmp ebx, 1
mov eax, ebx
ja 0x1003f738
mov eax, 1
inc eax
cmp eax, 2
jbe 0x1003f74d
cmp ebx, 1
mov esi, ebx
ja 0x1003f74a
mov esi, 1
inc esi
jmp 0x1003f752
mov esi, 2
mov ecx, dword [esp + 0x24]
lea eax, [esi*4]
push eax
push ecx
call fcn.100a0c80
cmp esi, 1
mov edx, dword [esp + 0x20]
mov dword [esp + 0x40], eax
mov dword [edx], eax
jle 0x1003f7ba
dec esi
lea ebx, [eax + 4]
mov dword [esp + 0x30], esi
mov dword [esp + 0x18], esi
fild dword [esp + 0x30]
lea eax, [esi - 1]
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
fmul qword [esp + 0x54]
fdiv st(1)
fsub qword [0x100fc0a8]
call sub.MSVCRT.dll__ftol
mov dword [ebx], eax
mov eax, dword [esp + 0x18]
dec esi
add ebx, 4
dec eax
mov dword [esp + 0x18], eax
jne 0x1003f783
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x40]
fstp st(0)
mov ecx, dword [esp + 0x20]
mov dword [eax], 0xf
mov eax, dword [esp + 0x2c]
inc ebx
add ecx, 4
dec eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x2c], eax
jne 0x1003f72c
mov ebx, dword [esp + 0x28]
mov ecx, dword [edi + 0x10]
inc ebx
push ecx
mov dword [esp + 0x2c], ebx
call fcn.10032ac0
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x24]
mov dword [esp + 0x54], eax
lea eax, [ebx + ebx + 2]
push eax
push esi
mov dword [esp + 0x54], eax
call fcn.100a0c80
push ebx
push esi
mov dword [esp + 0x20], eax
call fcn.100a0c80
mov ecx, dword [edi + 0x78]
xor esi, esi
mov ebx, dword [esp + 0x78]
mov dword [esp + 0x20], eax
sub ebx, ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x30], esi
mov edx, dword [ecx]
sub edx, ebx
cmp edx, ebp
jge 0x1003f849
mov eax, ecx
mov edx, dword [eax + 4]
add eax, 4
sub edx, ebx
inc esi
cmp edx, ebp
jl 0x1003f838
mov dword [esp + 0x30], esi
mov edx, dword [ecx + esi*4]
lea eax, [ecx + esi*4]
mov ecx, dword [esp + 0x1c]
sub edx, ebx
add ecx, ebp
mov dword [esp + 0x10], esi
cmp edx, ecx
mov dword [esp + 0x50], eax
jge 0x1003f877
mov edx, dword [esp + 0x10]
add eax, 4
inc edx
mov dword [esp + 0x10], edx
mov edx, dword [eax]
sub edx, ebx
cmp edx, ecx
jl 0x1003f863
mov eax, dword [edi]
push eax
call sym.GEAR32PO.OCX_GPb_width_get
cmp dword [esp + 0x10], eax
jl 0x1003f891
mov ecx, dword [edi]
push ecx
call sym.GEAR32PO.OCX_GPb_width_get
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x1c]
xor eax, eax
test edx, edx
mov ecx, esi
mov dword [esp + 0x2c], eax
jle 0x1003f8fc
mov esi, dword [esp + 0x44]
mov dword [esp + 0x40], ecx
cmp ecx, esi
jge 0x1003f8d1
mov edx, dword [esp + 0x14]
mov eax, dword [edx + ecx*4]
lea edx, [edx + ecx*4]
sub eax, ebx
sub eax, ebp
mov edi, dword [edx]
sub edi, ebx
sub edi, ebp
cmp edi, eax
jne 0x1003f8cd
inc ecx
add edx, 4
cmp ecx, esi
jl 0x1003f8bb
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x40]
mov esi, dword [esp + 0x28]
mov edx, ecx
sub edx, edi
cmp edx, esi
mov edx, dword [esp + 0x20]
jne 0x1003f8eb
mov byte [eax + edx], 1
jmp 0x1003f8ef
mov byte [eax + edx], 0
mov edx, dword [esp + 0x1c]
inc eax
cmp eax, edx
mov dword [esp + 0x2c], eax
jl 0x1003f8a1
mov eax, dword [esp + 0x94]
mov ecx, dword [esp + 0x98]
cmp eax, ecx
mov dword [esp + 0x28], 0
jge 0x1003fb12
mov ecx, dword [esp + 0x48]
lea edx, [ecx + eax*4]
mov dword [esp + 0x1c], edx
mov ecx, dword [esp + 0x4c]
mov esi, dword [esp + 0x18]
mov edx, ecx
xor eax, eax
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x90]
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x60]
sub eax, dword [ecx]
push eax
mov eax, dword [edx]
push eax
call sym.GEAR32PO.OCX_GPb_image_run_row_get
mov edi, eax
xor ecx, ecx
mov cx, word [edi + 2]
lea edx, [edi + 2]
mov eax, ecx
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + eax*4]
sub eax, ebx
cmp eax, ebp
jge 0x1003f984
add edx, 2
xor eax, eax
mov ax, word [edx]
mov eax, dword [ecx + eax*4]
sub eax, ebx
cmp eax, ebp
jl 0x1003f973
mov eax, edx
sub eax, edi
sub eax, 2
test al, 2
je 0x1003f9c8
mov edi, dword [esp + 0x10]
xor eax, eax
mov ax, word [edx]
cmp eax, edi
jl 0x1003f99e
mov eax, edi
mov edi, dword [esp + 0x30]
cmp edi, eax
jge 0x1003f9c5
mov ecx, dword [esp + 0x50]
sub eax, edi
mov edi, eax
mov eax, dword [ecx]
add ecx, 4
sub eax, ebx
sub eax, ebp
inc word [esi + eax*2]
dec edi
lea eax, [esi + eax*2]
jne 0x1003f9ae
mov ecx, dword [esp + 0x14]
add edx, 2
mov edi, dword [esp + 0x34]
xor eax, eax
mov ax, word [edx]
mov esi, dword [ecx + eax*4]
cmp esi, edi
jge 0x1003fa1f
mov edi, dword [esp + 0x10]
xor esi, esi
mov si, word [edx + 2]
cmp esi, edi
jl 0x1003f9e8
mov esi, edi
cmp eax, esi
jge 0x1003fa0c
lea ecx, [ecx + eax*4]
sub esi, eax
mov eax, dword [ecx]
mov edi, dword [esp + 0x18]
sub eax, ebx
add ecx, 4
sub eax, ebp
inc word [edi + eax*2]
dec esi
lea eax, [edi + eax*2]
jne 0x1003f9f1
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x34]
add edx, 4
xor eax, eax
mov ax, word [edx]
mov esi, dword [ecx + eax*4]
cmp esi, edi
jl 0x1003f9d8
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x54]
mov esi, eax
shr esi, 1
add esi, edx
test al, 1
jne 0x1003fa8c
mov ecx, dword [esp + 0x90]
xor edi, edi
mov edx, dword [ecx + 0x10]
push edx
call fcn.10032b70
test eax, eax
jle 0x1003fae6
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
xor eax, eax
xor edx, edx
mov al, byte [ecx + edi]
mov dx, word [ebp]
add ebp, 2
mov eax, dword [esp + eax*4 + 0x7c]
mov eax, dword [eax + edx*4]
shl eax, 4
mov byte [esi], al
mov eax, dword [esp + 0x90]
mov ecx, dword [eax + 0x9c]
add esi, ecx
mov ecx, dword [eax + 0x10]
push ecx
inc edi
call fcn.10032b70
cmp edi, eax
jl 0x1003fa4f
jmp 0x1003fae2
mov edx, dword [esp + 0x90]
xor edi, edi
mov eax, dword [edx + 0x10]
push eax
call fcn.10032b70
test eax, eax
jle 0x1003fae6
mov ebp, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
xor ecx, ecx
xor eax, eax
mov cl, byte [edx + edi]
mov ax, word [ebp]
mov dl, byte [esi]
add ebp, 2
mov ecx, dword [esp + ecx*4 + 0x7c]
mov eax, dword [ecx + eax*4]
or dl, al
mov eax, dword [esp + 0x90]
mov byte [esi], dl
mov ecx, dword [eax + 0x9c]
mov edx, dword [eax + 0x10]
add esi, ecx
push edx
inc edi
call fcn.10032b70
cmp edi, eax
jl 0x1003faa6
mov ebp, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x28], eax
add eax, ecx
mov ecx, dword [esp + 0x98]
add edx, 4
cmp eax, ecx
mov dword [esp + 0x1c], edx
jl 0x1003f925
mov eax, dword [esp + 0x18]
test eax, eax
je 0x1003fb25
mov edx, dword [esp + 0x24]
push eax
push edx
call fcn.100a1010
mov eax, dword [esp + 0x24]
push eax
call fcn.100a12c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret 0x18