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

Disassembly:
sub esp, 0x7c
push ebx
mov ebx, dword [esp + 0x84]
push ebp
push esi
mov ecx, dword [ebx]
push edi
lea eax, [esp + 0x40]
push 0
push eax
push 0
push ecx
call fcn.10084750
mov eax, dword [esp + 0xa0]
mov ecx, dword [eax]
mov dword [esp + 0x6c], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x70], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x74], ecx
mov ecx, dword [esp + 0xa4]
mov eax, dword [eax + 0xc]
mov esi, dword [ecx]
sub eax, edx
mov edx, dword [ebx]
mov ebp, dword [ecx + 4]
push edx
mov edi, dword [ecx + 8]
mov dword [esp + 0x68], edi
mov edi, dword [ebx + 0x70]
mov ecx, dword [ecx + 0xc]
mov dword [esp + 0x6c], ecx
mov ecx, dword [ebx + 0x78]
sub ecx, edi
mov edi, eax
mov dword [esp + 0x24], ecx
call sym.GEAR32PO.OCX_GPb_height_get
sub eax, ebp
dec eax
mov dword [esp + 0x60], eax
call fcn.100a0c60
mov dword [esp + 0x28], eax
mov eax, dword [ebx]
push eax
call sym.GEAR32PO.OCX_GPb_width_get
xor edx, edx
mov ecx, dword [ebx + 0x80]
mov dword [esp + 0x30], eax
mov eax, dword [ebx + 0x7c]
mov dword [esp + 0x18], eax
mov dword [esp + 0x58], 0
mov eax, dword [eax + esi*4]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x24], eax
add eax, edi
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x64]
sub eax, esi
mov dword [esp + 0x10], 2
inc eax
div edi
mov edx, dword [esp + 0x40]
mov dword [esp + 0x54], edx
fild qword [esp + 0x54]
fmul qword [str._23333]
fstp qword [esp + 0x54]
mov dword [esp + 0x2c], eax
mov edi, eax
lea eax, [esp + 0x7c]
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], eax
cmp edi, 1
mov eax, edi
ja 0x1003e118
mov eax, 1
inc eax
cmp eax, 2
jbe 0x1003e12d
cmp edi, 1
mov esi, edi
ja 0x1003e12a
mov esi, 1
inc esi
jmp 0x1003e132
mov esi, 2
mov edx, dword [esp + 0x28]
lea ecx, [esi*4]
push ecx
push edx
call fcn.100a0c80
mov ebp, eax
cmp esi, 1
mov eax, dword [esp + 0x1c]
mov dword [eax], ebp
jle 0x1003e191
dec esi
lea edi, [ebp + 4]
mov dword [esp + 0x38], esi
mov ebx, esi
fild dword [esp + 0x38]
lea ecx, [esi - 1]
mov dword [esp + 0x38], ecx
fild dword [esp + 0x38]
fmul qword [esp + 0x54]
fdiv st(1)
fsub qword [0x100fc0a8]
call sub.MSVCRT.dll__ftol
mov dword [edi], eax
dec esi
add edi, 4
dec ebx
jne 0x1003e15f
mov ebx, dword [esp + 0x90]
mov edi, dword [esp + 0x14]
fstp st(0)
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
inc edi
add ecx, 4
dec eax
mov dword [ebp], 0xf
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
jne 0x1003e10c
mov edi, dword [esp + 0x2c]
mov edx, dword [ebx + 0x10]
inc edi
push edx
mov dword [esp + 0x30], edi
call fcn.10032ac0
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x54], eax
lea eax, [esi + esi + 2]
push eax
push edi
mov dword [esp + 0x54], eax
call fcn.100a0c80
push esi
push edi
mov dword [esp + 0x1c], eax
call fcn.100a0c80
mov ebp, dword [ebx + 0x70]
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x70]
mov esi, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
mov eax, dword [ecx]
sub ebp, edi
sub eax, ebp
xor edi, edi
cmp eax, esi
mov dword [esp + 0x38], edi
jge 0x1003e225
mov eax, ecx
mov edx, dword [eax + 4]
add eax, 4
sub edx, ebp
inc edi
cmp edx, esi
jl 0x1003e214
mov dword [esp + 0x38], edi
mov edx, dword [ecx + edi*4]
lea eax, [ecx + edi*4]
mov ecx, dword [esp + 0x20]
sub edx, ebp
add ecx, esi
mov dword [esp + 0x10], edi
cmp edx, ecx
mov dword [esp + 0x50], eax
jge 0x1003e253
mov edx, dword [esp + 0x10]
add eax, 4
inc edx
mov dword [esp + 0x10], edx
mov edx, dword [eax]
sub edx, ebp
cmp edx, ecx
jl 0x1003e23f
mov eax, dword [ebx]
push eax
call sym.GEAR32PO.OCX_GPb_width_get
cmp dword [esp + 0x10], eax
jl 0x1003e26d
mov ecx, dword [ebx]
push ecx
call sym.GEAR32PO.OCX_GPb_width_get
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x20]
xor eax, eax
test edx, edx
mov ecx, edi
mov dword [esp + 0x34], eax
jle 0x1003e2dc
mov edx, dword [esp + 0x30]
mov dword [esp + 0x44], ecx
cmp ecx, edx
jge 0x1003e2b1
mov edx, dword [esp + 0x18]
mov eax, dword [edx + ecx*4]
lea edx, [edx + ecx*4]
sub eax, esi
sub eax, ebp
mov edi, dword [edx]
sub edi, esi
sub edi, ebp
cmp edi, eax
jne 0x1003e2ad
mov edi, dword [esp + 0x30]
inc ecx
add edx, 4
cmp ecx, edi
jl 0x1003e297
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x44]
mov edx, ecx
sub edx, edi
mov edi, dword [esp + 0x2c]
cmp edx, edi
mov edx, dword [esp + 0x1c]
jne 0x1003e2cb
mov byte [eax + edx], 1
jmp 0x1003e2cf
mov byte [eax + edx], 0
mov edx, dword [esp + 0x20]
inc eax
cmp eax, edx
mov dword [esp + 0x34], eax
jl 0x1003e27d
mov eax, dword [ebx + 0x10]
push eax
call fcn.10032b60
dec eax
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x98]
cmp ecx, eax
jge 0x1003e520
mov edx, dword [esp + 0x48]
sub eax, ecx
mov dword [esp + 0x34], eax
lea edx, [edx + ecx*4]
mov dword [esp + 0x2c], edx
jmp 0x1003e317
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x4c]
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 ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x60]
mov edx, dword [ecx]
sub eax, edx
mov edx, dword [ebx]
push eax
push edx
call sym.GEAR32PO.OCX_GPb_image_run_row_get
lea edx, [eax + 2]
xor ecx, ecx
mov cx, word [edx]
mov edi, ecx
mov ecx, dword [esp + 0x18]
mov edi, dword [ecx + edi*4]
sub edi, ebp
cmp edi, esi
jge 0x1003e36c
add edx, 2
xor edi, edi
mov di, word [edx]
mov edi, dword [ecx + edi*4]
sub edi, ebp
cmp edi, esi
jl 0x1003e35b
mov ecx, edx
sub ecx, eax
sub ecx, 2
test cl, 2
je 0x1003e3bb
mov edi, dword [esp + 0x10]
xor eax, eax
mov ax, word [edx]
cmp eax, edi
jl 0x1003e387
mov eax, edi
mov esi, dword [esp + 0x38]
cmp esi, eax
jge 0x1003e3b6
mov ecx, dword [esp + 0x50]
sub eax, esi
mov esi, eax
mov eax, dword [ecx]
mov edi, dword [esp + 0x24]
sub eax, edi
mov edi, dword [esp + 0x14]
sub eax, ebp
add ecx, 4
inc word [edi + eax*2]
dec esi
lea eax, [edi + eax*2]
jne 0x1003e397
mov edi, dword [esp + 0x10]
add edx, 2
jmp 0x1003e3bf
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
xor eax, eax
mov ax, word [edx]
mov esi, dword [ecx + eax*4]
cmp esi, dword [esp + 0x3c]
jge 0x1003e41a
xor esi, esi
mov si, word [edx + 2]
cmp esi, edi
jl 0x1003e3dd
mov esi, edi
cmp eax, esi
jge 0x1003e409
lea ecx, [ecx + eax*4]
sub esi, eax
mov eax, dword [ecx]
mov edi, dword [esp + 0x24]
sub eax, edi
mov edi, dword [esp + 0x14]
sub eax, ebp
add ecx, 4
inc word [edi + eax*2]
dec esi
lea eax, [edi + eax*2]
jne 0x1003e3e6
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
add edx, 4
xor eax, eax
mov ax, word [edx]
mov esi, dword [ecx + eax*4]
cmp esi, dword [esp + 0x3c]
jl 0x1003e3d1
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x54]
mov esi, eax
shr esi, 1
add esi, edx
test al, 1
jne 0x1003e4c2
mov ecx, dword [ebx + 0x10]
push ecx
call fcn.10032b60
mov edx, dword [ebx + 0x10]
dec eax
mov ecx, dword [esp + 0x20]
push edx
cmp ecx, eax
jne 0x1003e486
call fcn.10032b70
dec eax
js 0x1003e4fd
mov ecx, dword [esp + 0x14]
lea edx, [ecx + eax*2]
mov edi, dword [esp + 0x1c]
xor ecx, ecx
sub edx, 2
mov cl, byte [edi + eax]
xor edi, edi
mov di, word [edx + 2]
mov ecx, dword [esp + ecx*4 + 0x7c]
mov ecx, dword [ecx + edi*4]
shl ecx, 4
mov byte [esi], cl
mov edi, dword [ebx + 0x9c]
add esi, edi
dec eax
test eax, eax
jge 0x1003e459
jmp 0x1003e4fd
call fcn.10032b70
dec eax
js 0x1003e4fd
mov ecx, dword [esp + 0x14]
lea edx, [ecx + eax*2]
mov edi, dword [esp + 0x1c]
xor ecx, ecx
sub edx, 2
mov cl, byte [edi + eax]
xor edi, edi
mov di, word [edx + 2]
mov ecx, dword [esp + ecx*4 + 0x7c]
mov ecx, dword [ecx + edi*4]
shl ecx, 4
or byte [esi], cl
mov edi, dword [ebx + 0x9c]
add esi, edi
dec eax
test eax, eax
jge 0x1003e495
jmp 0x1003e4fd
mov edx, dword [ebx + 0x10]
push edx
call fcn.10032b70
dec eax
js 0x1003e4fd
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + eax*2]
mov edi, dword [esp + 0x1c]
xor edx, edx
sub ecx, 2
mov dl, byte [edi + eax]
xor edi, edi
mov di, word [ecx + 2]
mov edx, dword [esp + edx*4 + 0x7c]
mov edx, dword [edx + edi*4]
mov byte [esi], dl
mov edi, dword [ebx + 0x9c]
add esi, edi
dec eax
test eax, eax
jge 0x1003e4d5
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
dec edx
add ecx, 4
dec eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x34], eax
jne 0x1003e313
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1003e533
push eax
mov eax, dword [esp + 0x2c]
push eax
call fcn.100a1010
mov ecx, dword [esp + 0x28]
push ecx
call fcn.100a12c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret 0x18