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

Disassembly:
sub esp, 0x84
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x98]
lea eax, [esp + 0x58]
push 0
push eax
mov ecx, dword [edi]
push 0
push ecx
call fcn.10084750
mov eax, dword [esp + 0xa8]
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x68], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x6c], ecx
mov ebx, dword [eax + 0xc]
mov eax, dword [esp + 0xac]
mov ebp, dword [eax]
mov esi, dword [eax + 4]
mov ecx, dword [eax + 8]
mov dword [esp + 0x7c], ecx
mov ecx, dword [edi + 0x74]
mov eax, dword [eax + 0xc]
sub ecx, dword [edi + 0x6c]
mov edi, dword [esp + 0x6c]
sub eax, esi
sub edi, edx
mov edx, dword [esp + 0x98]
inc eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], eax
mov eax, dword [edx]
push eax
call sym.GEAR32PO.OCX_GPb_height_get
sub eax, esi
dec eax
mov dword [esp + 0x78], eax
call fcn.100a0c60
mov esi, dword [esp + 0x98]
mov dword [esp + 0x40], eax
mov ecx, dword [esi]
push ecx
call sym.GEAR32PO.OCX_GPb_width_get
mov edx, dword [esi + 0x80]
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0x7c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x60], edx
mov eax, dword [eax + ebp*4]
xor edx, edx
mov dword [esp + 0x48], eax
add eax, edi
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x7c]
sub eax, ebp
mov ecx, dword [esp + 0x58]
inc eax
mov dword [esp + 0x4c], ecx
div edi
xor edx, edx
mov dword [esp + 0x50], 0
fild qword [esp + 0x4c]
mov dword [esp + 0x20], 2
fmul qword [str._23333]
fstp qword [esp + 0x4c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x68]
sub ebx, eax
mov eax, dword [esp + 0x18]
div ebx
mov ebp, eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x30], ebp
lea eax, [esp + 0x84]
jmp 0x1003e663
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
add eax, 8
mov dword [esp + 0x28], esi
mov dword [esp + 0x10], 2
mov dword [esp + 0x18], eax
cmp esi, 1
mov ecx, esi
ja 0x1003e68a
mov ecx, 1
cmp ebp, 1
mov eax, ebp
jg 0x1003e696
mov eax, 1
imul eax, ecx
inc eax
cmp eax, 2
jbe 0x1003e6bd
cmp esi, 1
mov eax, esi
ja 0x1003e6ab
mov eax, 1
cmp ebp, 1
mov edi, ebp
jg 0x1003e6b7
mov edi, 1
imul edi, eax
inc edi
jmp 0x1003e6c2
mov edi, 2
mov eax, dword [esp + 0x40]
lea edx, [edi*4]
push edx
push eax
call fcn.100a0c80
mov ebx, eax
cmp edi, 1
mov ecx, dword [esp + 0x1c]
mov dword [ecx], ebx
jle 0x1003e71f
dec edi
lea ebp, [ebx + 4]
mov dword [esp + 0x38], edi
mov esi, edi
fild dword [esp + 0x38]
lea edx, [edi - 1]
mov dword [esp + 0x38], edx
fild dword [esp + 0x38]
fmul qword [esp + 0x4c]
fdiv st(1)
fsub qword [0x100fc0a8]
call sub.MSVCRT.dll__ftol
mov dword [ebp], eax
dec edi
add ebp, 4
dec esi
jne 0x1003e6ef
mov ebp, dword [esp + 0x30]
mov esi, dword [esp + 0x28]
fstp st(0)
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
add edx, 4
inc esi
dec eax
mov dword [ebx], 0xf
mov dword [esp + 0x1c], edx
mov dword [esp + 0x28], esi
mov dword [esp + 0x10], eax
jne 0x1003e67e
mov eax, dword [esp + 0x20]
inc ebp
dec eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x20], eax
jne 0x1003e65f
mov eax, dword [esp + 0x98]
mov edi, dword [esp + 0x44]
mov esi, dword [esp + 0x14]
inc edi
mov ecx, dword [eax + 0x10]
inc esi
push ecx
mov dword [esp + 0x48], edi
mov dword [esp + 0x18], esi
call fcn.10032b70
mov esi, eax
mov edi, dword [esp + 0x98]
dec esi
mov edx, dword [edi + 0x10]
imul esi, dword [edi + 0x9c]
push edx
call fcn.10032ac0
add esi, eax
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x28], esi
lea eax, [ebx + ebx + 2]
push eax
push ebp
call fcn.100a0c80
push ebx
push ebp
mov dword [esp + 0x3c], eax
call fcn.100a0c80
mov edx, dword [edi + 0x74]
xor edi, edi
mov ebx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x48]
sub ebx, edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x4c], ebx
mov eax, dword [edx]
mov dword [esp + 0x38], edi
sub eax, ebx
cmp eax, ecx
jge 0x1003e7f2
mov eax, edx
mov ebp, dword [eax + 4]
add eax, 4
sub ebp, ebx
inc edi
cmp ebp, ecx
jl 0x1003e7e1
mov dword [esp + 0x38], edi
lea eax, [edx + edi*4]
mov edx, dword [esp + 0x24]
add ecx, edx
mov ebp, edi
mov edx, dword [eax]
mov dword [esp + 0x20], ebp
sub edx, ebx
mov dword [esp + 0x5c], eax
cmp edx, ecx
jge 0x1003e81e
mov edx, dword [eax + 4]
add eax, 4
sub edx, ebx
inc ebp
cmp edx, ecx
jl 0x1003e80d
mov dword [esp + 0x20], ebp
mov eax, dword [esp + 0x98]
mov ecx, dword [eax]
push ecx
call sym.GEAR32PO.OCX_GPb_width_get
cmp ebp, eax
jl 0x1003e844
mov edx, dword [esp + 0x98]
mov eax, dword [edx]
push eax
call sym.GEAR32PO.OCX_GPb_width_get
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x24]
xor eax, eax
test edx, edx
mov ecx, edi
mov dword [esp + 0x10], eax
jle 0x1003e8b7
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x18], ecx
cmp ecx, edx
jge 0x1003e88c
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x48]
mov eax, dword [edx + ecx*4]
lea edx, [edx + ecx*4]
sub eax, edi
sub eax, ebx
mov ebp, dword [edx]
sub ebp, edi
sub ebp, ebx
cmp ebp, eax
jne 0x1003e888
mov ebp, dword [esp + 0x3c]
inc ecx
add edx, 4
cmp ecx, ebp
jl 0x1003e872
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
mov edx, ecx
sub edx, ebp
cmp edx, edi
mov edx, dword [esp + 0x1c]
jne 0x1003e8a6
mov byte [eax + edx], 1
jmp 0x1003e8aa
mov byte [eax + edx], 0
mov edx, dword [esp + 0x24]
inc eax
cmp eax, edx
mov dword [esp + 0x10], eax
jl 0x1003e854
mov ecx, dword [esp + 0x9c]
mov eax, dword [esp + 0xa0]
cmp ecx, eax
jge 0x1003eb0b
mov edx, dword [esp + 0x60]
sub eax, ecx
mov dword [esp + 0x18], eax
lea edx, [edx + ecx*4 + 4]
mov dword [esp + 0x3c], edx
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x34]
lea ecx, [eax + eax]
xor eax, eax
mov ebp, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebp
mov ebp, dword [esp + 0x78]
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [edx - 4]
mov ecx, dword [edx]
mov eax, ebp
sub eax, edi
cmp ecx, ebp
mov dword [esp + 0x10], eax
jl 0x1003e911
mov ecx, ebp
sub ebp, ecx
cmp eax, ebp
mov dword [esp + 0x14], ebp
jle 0x1003e929
mov dword [esp + 0x10], ebp
mov ebp, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], ebp
cmp eax, ebp
mov dword [esp + 0x30], eax
jge 0x1003ea3e
mov edx, dword [esp + 0x98]
mov ecx, dword [esp + 0x30]
push ecx
mov eax, dword [edx]
push eax
call sym.GEAR32PO.OCX_GPb_image_run_row_get
lea esi, [eax + 2]
xor ecx, ecx
mov edi, dword [esp + 0x48]
mov cx, word [esi]
mov edx, ecx
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + edx*4]
sub edx, ebx
cmp edx, edi
jge 0x1003e975
add esi, 2
xor edx, edx
mov dx, word [esi]
mov edx, dword [ecx + edx*4]
sub edx, ebx
cmp edx, edi
jl 0x1003e964
mov edx, esi
sub edx, eax
sub edx, 2
test dl, 2
je 0x1003e9c4
mov edx, dword [esp + 0x20]
xor eax, eax
mov ax, word [esi]
cmp eax, edx
jl 0x1003e990
mov eax, edx
mov edx, dword [esp + 0x38]
cmp edx, eax
jge 0x1003e9c1
mov ecx, dword [esp + 0x5c]
sub eax, edx
mov edx, eax
mov eax, dword [ecx]
mov ebp, dword [esp + 0x34]
sub eax, edi
add ecx, 4
sub eax, ebx
inc word [ebp + eax*2]
dec edx
lea eax, [ebp + eax*2]
jne 0x1003e9a0
mov ebp, dword [esp + 0x14]
mov ecx, dword [esp + 0x2c]
add esi, 2
mov edx, dword [esp + 0x54]
xor eax, eax
mov ax, word [esi]
mov ecx, dword [ecx + eax*4]
cmp ecx, edx
jge 0x1003ea25
mov ecx, dword [esp + 0x20]
xor edx, edx
mov dx, word [esi + 2]
cmp edx, ecx
jl 0x1003e9e4
mov edx, ecx
cmp eax, edx
jge 0x1003ea0e
mov ecx, dword [esp + 0x2c]
sub edx, eax
lea ecx, [ecx + eax*4]
mov eax, dword [ecx]
mov ebp, dword [esp + 0x34]
sub eax, edi
add ecx, 4
sub eax, ebx
inc word [ebp + eax*2]
dec edx
lea eax, [ebp + eax*2]
jne 0x1003e9f1
mov ebp, dword [esp + 0x14]
mov ecx, dword [esp + 0x2c]
add esi, 4
xor eax, eax
mov ax, word [esi]
mov edx, dword [ecx + eax*4]
mov ecx, dword [esp + 0x54]
cmp edx, ecx
jl 0x1003e9d4
mov eax, dword [esp + 0x30]
inc eax
cmp eax, ebp
mov dword [esp + 0x30], eax
jl 0x1003e935
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x44]
sub ebp, eax
mov eax, dword [esp + 0x24]
sub ebp, ecx
neg ebp
sbb ebp, ebp
mov edi, esi
and ebp, 0xfffffffe
add ebp, 2
dec eax
test eax, eax
jle 0x1003eaaf
mov ecx, dword [esp + 0x34]
lea esi, [ecx + eax*2]
mov edx, dword [esp + 0x1c]
xor ecx, ecx
xor ebx, ebx
mov cl, byte [edx + eax]
mov bx, word [esi]
or ecx, ebp
sub esi, 2
sub esi, 2
mov ecx, dword [esp + ecx*4 + 0x84]
mov ecx, dword [ecx + ebx*4]
xor ebx, ebx
mov bl, byte [edx + eax - 1]
xor edx, edx
shl ecx, 4
dec eax
mov dx, word [esi + 2]
or ebx, ebp
mov ebx, dword [esp + ebx*4 + 0x84]
or ecx, dword [ebx + edx*4]
inc edi
dec eax
mov byte [edi - 1], cl
test eax, eax
jg 0x1003ea62
mov ebx, dword [esp + 0x4c]
mov esi, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
dec ecx
test cl, 1
jne 0x1003eade
mov ecx, dword [esp + 0x1c]
xor edx, edx
mov dl, byte [ecx + eax]
xor ecx, ecx
or edx, ebp
mov ebp, dword [esp + 0x34]
mov cx, word [ebp + eax*2]
mov edx, dword [esp + edx*4 + 0x84]
mov eax, dword [edx + ecx*4]
shl eax, 4
mov byte [edi], al
mov eax, dword [esp + 0x98]
mov edx, dword [eax + 0x9c]
mov eax, dword [esp + 0x18]
sub esi, edx
mov edx, dword [esp + 0x3c]
add edx, 4
dec eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x18], eax
jne 0x1003e8df
mov eax, dword [esp + 0x34]
test eax, eax
je 0x1003eb1e
mov ecx, dword [esp + 0x40]
push eax
push ecx
call fcn.100a1010
mov edx, dword [esp + 0x40]
push edx
call fcn.100a12c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret 0x18