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

Disassembly:
sub esp, 0x50
mov eax, dword [esp + 0x64]
push ebx
mov ebx, dword [esp + 0x58]
push ebp
mov ecx, dword [eax]
push esi
mov ebp, dword [ebx + 0x5c]
mov dword [esp + 0x3c], ecx
mov edx, dword [eax + 4]
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x40], edx
and ebp, 7
mov edx, dword [eax + 8]
mov dword [esp + 0x38], ebp
mov ebp, dword [ebx + 0x74]
push edi
mov esi, dword [eax + 0xc]
mov eax, dword [ecx]
sub ebp, dword [ebx + 0x6c]
mov dword [esp + 0x50], eax
mov edi, dword [ecx + 4]
mov dword [esp + 0x74], ebp
mov ebp, dword [esp + 0x50]
mov eax, dword [ecx + 8]
sub eax, ebp
mov ecx, dword [ecx + 0xc]
inc eax
sub ecx, edi
mov ebp, eax
mov eax, dword [esp + 0x44]
inc ecx
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x40]
sub edx, ecx
mov ecx, dword [ebx]
sub esi, eax
push ecx
mov dword [esp + 0x7c], edx
mov dword [esp + 0x1c], esi
call sym.GEAR32PO.OCX_GPb_height_get
mov edx, dword [ebx + 0x6c]
sub eax, edi
dec eax
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x54], eax
mov eax, dword [ebx + 0x74]
sub eax, edx
mov dword [esp + 0x34], ebp
mov edx, dword [ebx + 0x7c]
lea edi, [eax*4]
xor eax, eax
mov dword [esp + 0x38], eax
fild qword [esp + 0x34]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], eax
fild qword [esp + 0x34]
lea esi, [edx + edi]
fdivp st(1)
fsub qword [0x100fc0a8]
call sub.MSVCRT.dll__ftol
add eax, dword [esi - 4]
mov dword [esi], eax
mov edx, dword [ebx]
push edx
call sym.GEAR32PO.OCX_GPb_width_get
mov ecx, dword [ebx + 0x7c]
mov esi, dword [ebx + 0x5c]
dec eax
mov edx, dword [ecx + edi]
add edx, esi
cmp edx, eax
jle 0x1003746d
mov eax, dword [ebx]
push eax
call sym.GEAR32PO.OCX_GPb_width_get
mov edx, dword [ebx + 0x5c]
mov ecx, dword [ebx + 0x7c]
sub eax, edx
dec eax
mov dword [ecx + edi], eax
mov edi, dword [esp + 0x28]
mov edx, dword [ebx + 0x80]
mov eax, dword [ebx + 0x70]
mov esi, dword [ebx + 0x78]
xor ecx, ecx
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], ecx
mov dword [esp + 0x2c], edx
fild qword [esp + 0x34]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x44]
sub esi, eax
mov dword [esp + 0x34], edx
sub eax, ecx
fild qword [esp + 0x34]
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fmul st(2)
fdiv st(1)
fxch st(2)
fdiv st(1)
fsubp st(2)
fxch st(1)
call sub.MSVCRT.dll__ftol
mov ecx, dword [esp + 0x2c]
test eax, eax
fstp st(0)
mov dword [ecx + esi*4], eax
jge 0x100374d4
mov dword [ecx + esi*4], 0xffffffff
mov eax, dword [ebx + 0x5c]
xor edx, edx
sar eax, 3
mov dword [ebx + 0x5c], eax
mov eax, ebp
div dword [esp + 0x78]
xor edx, edx
mov dword [esp + 0x28], eax
mov eax, edi
div dword [esp + 0x18]
mov ebp, eax
mov dword [esp + 0x10], ebp
call fcn.100a0c60
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ebp
lea eax, [esp + 0x40]
mov dword [esp + 0x24], 2
jmp 0x10037516
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x78], eax
add eax, 8
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], 2
mov dword [esp + 0x30], eax
cmp edi, 1
mov ecx, edi
ja 0x1003753d
mov ecx, 1
cmp ebp, 1
mov eax, ebp
ja 0x10037549
mov eax, 1
imul eax, ecx
inc eax
cmp eax, 2
jbe 0x10037570
cmp edi, 1
mov eax, edi
ja 0x1003755e
mov eax, 1
cmp ebp, 1
mov esi, ebp
ja 0x1003756a
mov esi, 1
imul esi, eax
inc esi
jmp 0x10037575
mov esi, 2
mov ecx, dword [esp + 0x18]
lea eax, [esi*4]
push eax
push ecx
call fcn.100a0c80
mov ecx, eax
cmp esi, 1
mov edx, dword [esp + 0x78]
mov dword [esp + 0x34], ecx
mov dword [edx], ecx
jbe 0x100375cf
lea eax, [esi + esi*2]
lea edi, [esi - 1]
lea esi, [ecx + 4]
mov ecx, 0x1e
lea ebx, [eax + eax*4]
mov ebp, edi
mov eax, ebx
xor edx, edx
sub eax, ecx
add ecx, 0xf
div edi
add esi, 4
dec ebp
mov dword [esi - 4], eax
jne 0x100375ab
mov ebx, dword [esp + 0x64]
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x20]
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x1c]
add edx, 4
inc edi
dec eax
mov dword [ecx], 0xf
mov dword [esp + 0x78], edx
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], eax
jne 0x10037531
mov eax, dword [esp + 0x24]
inc ebp
dec eax
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], eax
jne 0x10037512
mov esi, dword [esp + 0x10]
mov eax, dword [ebx]
mov ebp, dword [esp + 0x28]
inc esi
push eax
mov dword [esp + 0x14], esi
inc ebp
call sym.GEAR32PO.OCX_GPb_image_pointer_get
mov ecx, dword [ebx + 0x10]
push ecx
mov dword [esp + 0x38], eax
call fcn.10032ac0
mov edx, dword [ebx]
push edx
mov dword [esp + 0x7c], eax
call sym.GEAR32PO.OCX_GPb_bytes_per_raster_get
mov edi, dword [esp + 0x74]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x24], eax
lea eax, [edi + edi]
push eax
push esi
call fcn.100a0c80
push edi
push esi
mov dword [esp + 0x30], eax
call fcn.100a0c80
mov dword [esp + 0x14], eax
xor eax, eax
test edi, edi
jbe 0x10037687
mov ecx, dword [ebx + 0x7c]
mov edx, dword [ecx + eax*4 + 4]
sub edx, dword [ecx + eax*4]
cmp edx, ebp
jne 0x1003767a
mov ecx, dword [esp + 0x14]
mov byte [ecx + eax], 1
jmp 0x10037682
mov edx, dword [esp + 0x14]
mov byte [edx + eax], 0
inc eax
cmp eax, edi
jb 0x10037662
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x6c]
cmp ecx, eax
jae 0x10037819
mov edx, dword [esp + 0x2c]
sub eax, ecx
mov dword [esp + 0x1c], eax
lea edx, [edx + ecx*4 + 4]
mov dword [esp + 0x20], edx
jmp 0x100376af
mov edi, dword [esp + 0x74]
mov esi, dword [esp + 0x28]
lea ecx, [edi + edi]
mov ebp, ecx
xor eax, eax
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebp
mov ebp, dword [esp + 0x54]
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [edx - 4]
mov eax, dword [edx]
mov ecx, ebp
sub ecx, edi
cmp eax, ebp
mov dword [esp + 0x30], ecx
jl 0x100376df
mov eax, ebp
sub ebp, eax
cmp ecx, ebp
jae 0x1003778a
mov eax, ecx
mov edx, ebp
imul eax, dword [esp + 0x24]
sub edx, ecx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x34]
mov edi, dword [ebx + 0x5c]
add edx, eax
add edx, edi
xor edi, edi
cmp dword [esp + 0x74], edi
jbe 0x10037771
mov dword [esp + 0x68], esi
mov eax, dword [ebx + 0x7c]
mov ecx, dword [esp + 0x3c]
mov esi, dword [eax + edi*4 + 4]
mov eax, dword [eax + edi*4]
add esi, ecx
add eax, ecx
cmp eax, esi
jae 0x10037751
mov ecx, eax
mov ebx, 0x80
and ecx, 7
sar ebx, cl
mov ecx, eax
shr ecx, 3
mov cl, byte [ecx + edx]
test cl, bl
jne 0x10037748
mov ecx, dword [esp + 0x68]
inc word [ecx]
inc eax
cmp eax, esi
jb 0x10037729
mov ebx, dword [esp + 0x64]
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x74]
inc edi
add ecx, 2
cmp edi, eax
mov dword [esp + 0x68], ecx
jb 0x10037713
mov esi, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x6c]
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
add eax, edi
dec edx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x2c], edx
jne 0x100376fc
sub ebp, ecx
mov ecx, dword [esp + 0x10]
sub ebp, ecx
mov ecx, dword [esp + 0x74]
neg ebp
sbb ebp, ebp
xor eax, eax
and ebp, 0xfffffffe
add ebp, 2
test ecx, ecx
jbe 0x100377eb
mov edi, esi
mov ecx, dword [esp + 0x14]
xor edx, edx
mov dl, byte [ecx + eax]
xor ecx, ecx
mov cx, word [edi]
or edx, ebp
test al, 1
mov edx, dword [esp + edx*4 + 0x40]
mov ecx, dword [edx + ecx*4]
je 0x100377d1
mov esi, dword [esp + 0x78]
mov edx, eax
shr edx, 1
add edx, esi
or byte [edx], cl
jmp 0x100377df
mov esi, dword [esp + 0x78]
mov edx, eax
shl cl, 4
shr edx, 1
mov byte [edx + esi], cl
mov ecx, dword [esp + 0x74]
inc eax
add edi, 2
cmp eax, ecx
jb 0x100377a8
mov eax, dword [ebx + 0x9c]
mov edx, dword [esp + 0x78]
add edx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x78], edx
mov edx, dword [esp + 0x20]
add edx, 4
dec eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], eax
jne 0x100376ab
mov esi, dword [esp + 0x18]
push esi
call fcn.100a12c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret 0x18