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

Disassembly:
sub esp, 0x84
push ebx
mov ebx, dword [esp + 0x8c]
push ebp
push esi
mov ecx, dword [ebx]
push edi
lea eax, [esp + 0x5c]
push 0
push eax
push 0
push ecx
call fcn.10084750
mov edx, dword [esp + 0xa8]
mov eax, dword [edx]
mov dword [esp + 0x64], eax
mov ecx, dword [edx + 4]
mov dword [esp + 0x68], ecx
mov ecx, dword [edx + 8]
mov esi, dword [edx + 0xc]
mov edx, dword [esp + 0xac]
mov edi, dword [edx]
mov ebp, dword [edx + 4]
mov eax, dword [edx + 8]
mov dword [esp + 0x7c], eax
mov eax, dword [edx + 0xc]
mov edx, dword [ebx + 0x74]
sub edx, dword [ebx + 0x6c]
sub eax, ebp
inc eax
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x64]
sub ecx, edx
mov dword [esp + 0x24], eax
mov ebx, ecx
mov ecx, dword [esp + 0x98]
mov edx, dword [ecx]
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
xor edx, edx
mov ecx, dword [ebp + 0x80]
mov dword [esp + 0x44], eax
mov eax, dword [ebp + 0x7c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x50], 0
mov eax, dword [eax + edi*4]
mov dword [esp + 0x60], ecx
mov dword [esp + 0x54], eax
add eax, ebx
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x7c]
sub eax, edi
mov dword [esp + 0x18], 2
inc eax
div ebx
xor edx, edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x68]
sub esi, eax
mov eax, dword [esp + 0x24]
div esi
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x4c], edx
fild qword [esp + 0x4c]
fmul qword [str._23333]
fstp qword [esp + 0x4c]
mov ebx, eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x10], ebx
lea eax, [esp + 0x84]
jmp 0x10038de6
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
add eax, 8
mov dword [esp + 0x14], edi
mov dword [esp + 0x34], 2
mov dword [esp + 0x24], eax
cmp edi, 1
mov ecx, edi
ja 0x10038e0d
mov ecx, 1
cmp ebx, 1
mov eax, ebx
jg 0x10038e19
mov eax, 1
imul eax, ecx
inc eax
cmp eax, 2
jbe 0x10038e40
cmp edi, 1
mov eax, edi
ja 0x10038e2e
mov eax, 1
cmp ebx, 1
mov esi, ebx
jg 0x10038e3a
mov esi, 1
imul esi, eax
inc esi
jmp 0x10038e45
mov esi, 2
mov ecx, dword [esp + 0x3c]
lea eax, [esi*4]
push eax
push ecx
call fcn.100a0c80
mov ebp, eax
cmp esi, 1
mov edx, dword [esp + 0x20]
mov dword [edx], ebp
jle 0x10038ea1
dec esi
lea edi, [ebp + 4]
mov dword [esp + 0x28], esi
mov ebx, esi
fild dword [esp + 0x28]
lea eax, [esi - 1]
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fmul qword [esp + 0x4c]
fdiv st(1)
fsub qword [0x100fc0a8]
call sub.MSVCRT.dll__ftol
mov dword [edi], eax
dec esi
add edi, 4
dec ebx
jne 0x10038e72
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
fstp st(0)
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x34]
add edx, 4
inc edi
dec eax
mov dword [ebp], 0xf
mov dword [esp + 0x20], edx
mov dword [esp + 0x14], edi
mov dword [esp + 0x34], eax
jne 0x10038e01
mov eax, dword [esp + 0x18]
inc ebx
dec eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], eax
jne 0x10038de2
mov ecx, dword [esp + 0x48]
mov edi, dword [esp + 0x98]
mov eax, dword [esp + 0x1c]
inc ecx
mov dword [esp + 0x48], ecx
mov ecx, dword [edi + 0x10]
inc eax
push ecx
mov dword [esp + 0x20], eax
call fcn.10032ac0
mov esi, dword [esp + 0x30]
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x34], eax
lea edx, [esi + esi + 2]
push edx
push ebx
call fcn.100a0c80
push esi
push ebx
mov dword [esp + 0x40], eax
call fcn.100a0c80
mov ebp, dword [edi + 0x6c]
xor esi, esi
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x64]
mov dword [esp + 0x20], eax
sub ebp, ebx
mov eax, dword [ecx]
mov ebx, dword [esp + 0x54]
sub eax, ebp
mov dword [esp + 0x28], esi
cmp eax, ebx
jge 0x10038f55
mov eax, ecx
mov edx, dword [eax + 4]
add eax, 4
sub edx, ebp
inc esi
cmp edx, ebx
jl 0x10038f44
mov dword [esp + 0x28], esi
mov edx, dword [ecx + esi*4]
lea eax, [ecx + esi*4]
mov ecx, dword [esp + 0x30]
sub edx, ebp
add ecx, ebx
mov edi, esi
cmp edx, ecx
mov dword [esp + 0x40], edi
mov dword [esp + 0x4c], eax
jge 0x10038f82
mov edx, dword [eax + 4]
add eax, 4
sub edx, ebp
inc edi
cmp edx, ecx
jl 0x10038f71
mov dword [esp + 0x40], edi
mov eax, dword [esp + 0x98]
mov ecx, dword [eax]
push ecx
call sym.GEAR32PO.OCX_GPb_width_get
cmp edi, eax
jl 0x10038fa8
mov edx, dword [esp + 0x98]
mov eax, dword [edx]
push eax
call sym.GEAR32PO.OCX_GPb_width_get
mov dword [esp + 0x40], eax
mov edx, dword [esp + 0x30]
xor eax, eax
test edx, edx
mov ecx, esi
mov dword [esp + 0x14], eax
jle 0x10039013
mov esi, dword [esp + 0x44]
mov dword [esp + 0x24], ecx
cmp ecx, esi
jge 0x10038fec
mov edx, dword [esp + 0x2c]
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 0x10038fe4
inc ecx
add edx, 4
cmp ecx, esi
jl 0x10038fd2
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
mov esi, ecx
sub esi, edi
mov edi, dword [esp + 0x1c]
cmp esi, edi
mov esi, dword [esp + 0x20]
jne 0x10039006
mov byte [eax + esi], 1
jmp 0x1003900a
mov byte [eax + esi], 0
inc eax
cmp eax, edx
mov dword [esp + 0x14], eax
jl 0x10038fb8
mov ecx, dword [esp + 0x9c]
lea eax, [edx + edx]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0xa0]
cmp ecx, eax
jge 0x10039281
mov edx, dword [esp + 0x60]
sub eax, ecx
mov dword [esp + 0x24], eax
lea edx, [edx + ecx*4 + 4]
mov dword [esp + 0x14], edx
jmp 0x10039048
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x44]
mov edi, dword [esp + 0x38]
mov esi, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x78]
mov esi, dword [edx - 4]
mov ecx, dword [edx]
mov eax, edi
sub eax, esi
cmp ecx, edi
mov dword [esp + 0x10], eax
jl 0x10039077
mov ecx, edi
sub edi, ecx
cmp eax, edi
mov dword [esp + 0x1c], edi
jle 0x1003908f
mov dword [esp + 0x10], edi
mov edi, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], edi
cmp eax, edi
mov dword [esp + 0x18], eax
jge 0x10039198
mov ecx, dword [esp + 0x98]
mov eax, dword [esp + 0x18]
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 cx, word [esi]
mov edx, ecx
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + edx*4]
sub edx, ebp
cmp edx, ebx
jge 0x100390d7
add esi, 2
xor edx, edx
mov dx, word [esi]
mov edx, dword [ecx + edx*4]
sub edx, ebp
cmp edx, ebx
jl 0x100390c6
mov edx, esi
sub edx, eax
sub edx, 2
test dl, 2
je 0x10039124
mov edx, dword [esp + 0x40]
xor eax, eax
mov ax, word [esi]
cmp eax, edx
jl 0x100390f2
mov eax, edx
mov edx, dword [esp + 0x28]
cmp edx, eax
jge 0x10039121
mov ecx, dword [esp + 0x4c]
sub eax, edx
mov edx, eax
mov eax, dword [ecx]
mov edi, dword [esp + 0x38]
sub eax, ebx
add ecx, 4
sub eax, ebp
inc word [edi + eax*2]
dec edx
lea eax, [edi + eax*2]
jne 0x10039102
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x1c]
add esi, 2
mov edx, dword [esp + 0x58]
xor eax, eax
mov ax, word [esi]
mov ecx, dword [ecx + eax*4]
cmp ecx, edx
jge 0x10039183
mov ecx, dword [esp + 0x40]
xor edx, edx
mov dx, word [esi + 2]
cmp edx, ecx
jl 0x10039144
mov edx, ecx
cmp eax, edx
jge 0x1003916c
mov ecx, dword [esp + 0x2c]
sub edx, eax
lea ecx, [ecx + eax*4]
mov eax, dword [ecx]
mov edi, dword [esp + 0x38]
sub eax, ebx
add ecx, 4
sub eax, ebp
inc word [edi + eax*2]
dec edx
lea eax, [edi + eax*2]
jne 0x10039151
mov edi, dword [esp + 0x1c]
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 + 0x58]
cmp edx, ecx
jl 0x10039134
mov eax, dword [esp + 0x18]
inc eax
cmp eax, edi
mov dword [esp + 0x18], eax
jl 0x1003909b
mov eax, dword [esp + 0x10]
sub edi, eax
mov eax, dword [esp + 0x48]
sub edi, eax
mov edx, dword [esp + 0x34]
neg edi
sbb edi, edi
mov dword [esp + 0x18], edx
and edi, 0xfffffffe
mov eax, 0
add edi, 2
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x30]
and edi, 0xfffffffe
jle 0x10039221
mov esi, dword [esp + 0x38]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x10]
xor ecx, ecx
add esi, 2
mov cl, byte [edx + eax]
add esi, 2
or ecx, ebx
xor ebx, ebx
mov bx, word [esi - 4]
mov ecx, dword [esp + ecx*4 + 0x84]
mov ecx, dword [ecx + ebx*4]
xor ebx, ebx
mov bl, byte [edx + eax + 1]
mov edx, dword [esp + 0x10]
shl ecx, 4
inc eax
or ebx, edx
xor edx, edx
mov dx, word [esi - 2]
mov ebx, dword [esp + ebx*4 + 0x84]
or ecx, dword [ebx + edx*4]
mov edx, dword [esp + 0x18]
mov byte [edx], cl
inc edx
inc eax
mov dword [esp + 0x18], edx
cmp eax, edi
jl 0x100391c8
mov ebx, dword [esp + 0x54]
test byte [esp + 0x30], 1
je 0x10039250
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x38]
xor ecx, ecx
mov cl, byte [esi + eax]
mov esi, dword [esp + 0x10]
or ecx, esi
xor esi, esi
mov si, word [edi + eax*2]
mov eax, dword [esp + ecx*4 + 0x84]
mov eax, dword [eax + esi*4]
shl eax, 4
mov byte [edx], al
mov ecx, dword [esp + 0x98]
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
mov edx, dword [ecx + 0x9c]
mov ecx, dword [esp + 0x14]
add esi, edx
add ecx, 4
dec eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x24], eax
jne 0x10039044
mov eax, dword [esp + 0x38]
test eax, eax
je 0x10039294
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