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

Disassembly:
sub esp, 0x84
push ebx
push ebp
push esi
mov esi, dword [esp + 0x94]
push edi
lea eax, [esp + 0x58]
mov ecx, dword [esi]
push 0
push eax
push 0
push ecx
call fcn.10084750
mov eax, dword [esp + 0xa8]
mov ecx, dword [eax]
mov dword [esp + 0x64], ecx
mov ecx, dword [esp + 0xac]
mov edx, dword [eax + 4]
mov ebx, dword [ecx]
mov edi, dword [eax + 8]
mov ebp, dword [ecx + 4]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x70], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x7c], eax
mov eax, dword [ecx + 0xc]
mov ecx, dword [esi + 0x78]
sub ecx, dword [esi + 0x70]
mov esi, dword [esp + 0x70]
sub eax, ebp
sub esi, edx
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x98]
inc eax
mov edx, dword [ecx]
mov dword [esp + 0x30], eax
push edx
call sym.GEAR32PO.OCX_GPb_height_get
sub eax, ebp
dec eax
mov dword [esp + 0x78], eax
call fcn.100a0c60
mov ebp, dword [esp + 0x98]
mov dword [esp + 0x3c], eax
mov eax, dword [ebp]
push eax
call sym.GEAR32PO.OCX_GPb_width_get
mov ecx, dword [ebp + 0x80]
mov dword [esp + 0x5c], eax
mov eax, dword [ebp + 0x7c]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
mov ebp, dword [eax + ebx*4]
mov eax, dword [esp + 0x7c]
sub eax, ebx
mov ecx, dword [esp + 0x58]
lea edx, [ebp + esi]
inc eax
mov dword [esp + 0x50], edx
xor edx, edx
div esi
xor edx, edx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], ebp
fild qword [esp + 0x44]
mov dword [esp + 0x2c], 2
fmul qword [0x100fc0d0]
fstp qword [esp + 0x44]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x64]
sub edi, eax
mov eax, dword [esp + 0x30]
div edi
mov esi, eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x10], esi
lea eax, [esp + 0x84]
jmp 0x1003f13a
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x20], eax
add eax, 8
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], 2
mov dword [esp + 0x30], eax
jmp 0x1003f15b
mov esi, dword [esp + 0x10]
cmp edi, 1
mov ecx, edi
ja 0x1003f167
mov ecx, 1
cmp esi, 1
mov eax, esi
jg 0x1003f173
mov eax, 1
imul eax, ecx
inc eax
cmp eax, 2
jbe 0x1003f198
cmp edi, 1
mov eax, edi
ja 0x1003f188
mov eax, 1
cmp esi, 1
jg 0x1003f192
mov esi, 1
imul esi, eax
inc esi
jmp 0x1003f19d
mov esi, 2
mov eax, dword [esp + 0x3c]
lea edx, [esi*4]
push edx
push eax
call fcn.100a0c80
mov ebx, eax
cmp esi, 1
mov ecx, dword [esp + 0x20]
mov dword [ecx], ebx
jle 0x1003f1f9
dec esi
lea edi, [ebx + 4]
mov dword [esp + 0x14], esi
mov ebp, esi
fild dword [esp + 0x14]
lea edx, [esi - 1]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fmul qword [esp + 0x44]
fdiv st(1)
fsub qword [0x100fc0a8]
call sub.MSVCRT.dll__ftol
mov dword [edi], eax
dec esi
add edi, 4
dec ebp
jne 0x1003f1ca
mov edi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x4c]
fstp st(0)
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
add edx, 4
inc edi
dec eax
mov dword [ebx], 0xf
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], eax
jne 0x1003f157
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x2c]
inc ecx
dec eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x2c], eax
jne 0x1003f132
mov edi, dword [esp + 0x40]
mov esi, dword [esp + 0x28]
inc edi
inc esi
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x98]
mov dword [esp + 0x40], edi
mov eax, dword [esi + 0x10]
push eax
call fcn.10032ac0
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x44], eax
lea eax, [edi + edi + 2]
push eax
push ebx
mov dword [esp + 0x68], eax
call fcn.100a0c80
push edi
push ebx
mov dword [esp + 0x1c], eax
call fcn.100a0c80
mov ecx, dword [esp + 0x34]
mov ebx, dword [esp + 0x70]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x78]
mov edx, dword [ecx]
sub ebx, eax
sub edx, ebx
xor esi, esi
cmp edx, ebp
mov dword [esp + 0x30], esi
jge 0x1003f2b0
mov eax, ecx
mov edx, dword [eax + 4]
add eax, 4
sub edx, ebx
inc esi
cmp edx, ebp
jl 0x1003f29f
mov dword [esp + 0x30], esi
mov edx, dword [ecx + esi*4]
lea eax, [ecx + esi*4]
mov ecx, dword [esp + 0x18]
sub edx, ebx
add ecx, ebp
mov edi, esi
cmp edx, ecx
mov dword [esp + 0x10], edi
mov dword [esp + 0x54], eax
jge 0x1003f2dd
mov edx, dword [eax + 4]
add eax, 4
sub edx, ebx
inc edi
cmp edx, ecx
jl 0x1003f2cc
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x98]
mov ecx, dword [eax]
push ecx
call sym.GEAR32PO.OCX_GPb_width_get
cmp edi, eax
jl 0x1003f303
mov edx, dword [esp + 0x98]
mov eax, dword [edx]
push eax
call sym.GEAR32PO.OCX_GPb_width_get
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x18]
xor eax, eax
test edx, edx
mov ecx, esi
mov dword [esp + 0x1c], eax
jle 0x1003f36e
mov esi, dword [esp + 0x5c]
mov dword [esp + 0x24], ecx
cmp ecx, esi
jge 0x1003f343
mov edx, dword [esp + 0x34]
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 0x1003f33f
inc ecx
add edx, 4
cmp ecx, esi
jl 0x1003f32d
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
mov edx, ecx
sub edx, edi
cmp edx, esi
mov edx, dword [esp + 0x20]
jne 0x1003f35d
mov byte [eax + edx], 1
jmp 0x1003f361
mov byte [eax + edx], 0
mov edx, dword [esp + 0x18]
inc eax
cmp eax, edx
mov dword [esp + 0x1c], eax
jl 0x1003f313
mov eax, dword [esp + 0x9c]
mov ecx, dword [esp + 0xa0]
cmp eax, ecx
mov dword [esp + 0x24], 0
jge 0x1003f60a
mov ecx, dword [esp + 0x38]
lea esi, [ecx + eax*4 + 4]
mov dword [esp + 0x1c], esi
jmp 0x1003f3a2
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x4c]
mov ecx, dword [esp + 0x60]
mov edi, dword [esp + 0x14]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x78]
mov edi, dword [esi - 4]
mov ecx, dword [esi]
mov edx, eax
sub edx, edi
cmp ecx, eax
mov dword [esp + 0x2c], edx
jl 0x1003f3d1
mov ecx, eax
sub eax, ecx
cmp edx, eax
mov dword [esp + 0x18], eax
jle 0x1003f3e9
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], edx
mov eax, edx
mov edx, dword [esp + 0x2c]
cmp edx, eax
mov dword [esp + 0x28], edx
jge 0x1003f4ea
mov ecx, dword [esp + 0x98]
mov eax, dword [esp + 0x28]
push eax
mov edx, dword [ecx]
push edx
call sym.GEAR32PO.OCX_GPb_image_run_row_get
lea esi, [eax + 2]
xor ecx, ecx
mov edi, dword [esp + 0x34]
mov cx, word [esi]
mov edx, dword [edi + ecx*4]
sub edx, ebx
cmp edx, ebp
jge 0x1003f42f
add esi, 2
xor ecx, ecx
mov cx, word [esi]
mov edx, dword [edi + ecx*4]
sub edx, ebx
cmp edx, ebp
jl 0x1003f41e
mov ecx, esi
sub ecx, eax
sub ecx, 2
test cl, 2
je 0x1003f478
mov ecx, dword [esp + 0x10]
xor eax, eax
mov ax, word [esi]
cmp eax, ecx
jl 0x1003f44a
mov eax, ecx
mov edx, dword [esp + 0x30]
cmp edx, eax
jge 0x1003f475
mov ecx, dword [esp + 0x54]
sub eax, edx
mov edx, eax
mov eax, dword [ecx]
mov edi, dword [esp + 0x14]
sub eax, ebx
add ecx, 4
sub eax, ebp
inc word [edi + eax*2]
dec edx
lea eax, [edi + eax*2]
jne 0x1003f45a
mov edi, dword [esp + 0x34]
add esi, 2
mov edx, dword [esp + 0x50]
xor eax, eax
mov ax, word [esi]
mov ecx, dword [edi + eax*4]
cmp ecx, edx
jge 0x1003f4cf
mov ecx, dword [esp + 0x10]
xor edx, edx
mov dx, word [esi + 2]
cmp edx, ecx
jl 0x1003f498
mov edx, ecx
cmp eax, edx
jge 0x1003f4bc
lea ecx, [edi + eax*4]
sub edx, eax
mov eax, dword [ecx]
mov edi, dword [esp + 0x14]
sub eax, ebx
add ecx, 4
sub eax, ebp
inc word [edi + eax*2]
dec edx
lea eax, [edi + eax*2]
jne 0x1003f4a1
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x50]
add esi, 4
xor eax, eax
mov ax, word [esi]
mov ecx, dword [edi + eax*4]
cmp ecx, edx
jl 0x1003f488
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
inc eax
cmp eax, ecx
mov dword [esp + 0x28], eax
jl 0x1003f3f5
mov edx, dword [esp + 0x2c]
mov eax, ecx
mov esi, dword [esp + 0x40]
sub eax, edx
sub eax, esi
mov edx, dword [esp + 0x44]
neg eax
sbb eax, eax
and al, 0xfe
add eax, 2
mov ebp, eax
mov eax, dword [esp + 0x24]
mov esi, eax
shr esi, 1
add esi, edx
test al, 1
jne 0x1003f579
mov edx, dword [esp + 0x98]
xor edi, edi
mov eax, dword [edx + 0x10]
push eax
call fcn.10032b70
test eax, eax
jle 0x1003f5de
mov ecx, dword [esp + 0x14]
jmp 0x1003f533
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x20]
xor edx, edx
add ecx, 2
mov dl, byte [eax + edi]
xor eax, eax
mov ax, word [ecx - 2]
or edx, ebp
mov dword [esp + 0x38], ecx
mov edx, dword [esp + edx*4 + 0x84]
mov eax, dword [edx + eax*4]
shl eax, 4
mov byte [esi], al
mov eax, dword [esp + 0x98]
mov edx, dword [eax + 0x9c]
mov eax, dword [eax + 0x10]
add esi, edx
push eax
inc edi
call fcn.10032b70
cmp edi, eax
jl 0x1003f52f
jmp 0x1003f5de
mov ecx, dword [esp + 0x98]
xor edi, edi
mov edx, dword [ecx + 0x10]
push edx
call fcn.10032b70
test eax, eax
jle 0x1003f5de
mov ecx, dword [esp + 0x14]
jmp 0x1003f599
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x20]
xor eax, eax
add ecx, 2
mov al, byte [edx + edi]
xor edx, edx
mov dx, word [ecx - 2]
or eax, ebp
mov dword [esp + 0x38], ecx
mov eax, dword [esp + eax*4 + 0x84]
mov eax, dword [eax + edx*4]
mov dl, byte [esi]
or dl, al
mov eax, dword [esp + 0x98]
mov byte [esi], dl
mov edx, dword [eax + 0x9c]
mov ecx, dword [eax + 0x10]
add esi, edx
push ecx
inc edi
call fcn.10032b70
cmp edi, eax
jl 0x1003f595
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0xa0]
add edx, 4
inc eax
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x9c]
mov dword [esp + 0x24], eax
add eax, edx
cmp eax, ecx
jl 0x1003f39a
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1003f61d
push eax
mov eax, dword [esp + 0x40]
push eax
call fcn.100a1010
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.100a12c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret 0x18