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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x274
mov eax, dword [0x10054040]
xor eax, esp
mov dword [esp + 0x270], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x20]
push edi
push ecx
push 9
push 0x10055fc0
mov dword [0x100560d4], eax
call fcn.10028b1b
add esp, 0xc
push esi
push 0x104
push 0x10055fd0
call fcn.10028b1b
movzx edi, word [ebp + 0x14]
add esp, 0xc
movzx ebx, word [ebp + 0x10]
mov esi, edi
mov edx, dword [0x100560d4]
imul esi, ebx
mov dword [esp + 0x60], edi
and esi, 0x7fffffff
mov dword [esp + 0x64], esi
jbe 0x100012fb
mov ax, word [edx]
lea edx, [edx + 2]
movzx ecx, byte [edx - 1]
shl ax, 8
or cx, ax
mov word [edx - 2], cx
sub esi, 1
jne 0x100012e1
cmp byte [ebp + 0x18], 0
push 0x104
mov dword [esp + 0x20], 0
push 0
je 0x10001907
lea eax, [esp + 0x70]
push eax
call fcn.10025880
add esp, 0xc
mov dword [esp + 0x44], 0
lea eax, [esp + 0x68]
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x38], 0
push 0x10055fc0
push 0x10055fd0
push str._s_s_Offset_Image0
push eax
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
call fcn.10002f90
mov esi, dword [ebp + 0x18]
lea edx, [esp + 0x54]
push esi
lea ecx, [esp + 0x7c]
call fcn.10003ea0
add esp, 0x14
test al, al
jne 0x100013fc
mov edx, dword [esp + 0x44]
mov dword [esp + 0x1c], 0xffffffff
test edx, edx
je 0x10001d02
mov ecx, dword [esp + 0x4c]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x100013ed
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push ecx
push edx
call fcn.10022cf6
add esp, 8
jmp 0x10001d02
push 0x10055fc0
push 0x10055fd0
lea eax, [esp + 0x70]
push str._s_s_Offset_Image1
push eax
call fcn.10002f90
push esi
lea edx, [esp + 0x4c]
lea ecx, [esp + 0x7c]
call fcn.10003ea0
add esp, 0x14
test al, al
jne 0x100014b1
mov edx, dword [esp + 0x38]
mov dword [esp + 0x1c], 0xffffffff
test edx, edx
je 0x1000146f
mov ecx, dword [esp + 0x40]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x10001465
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push ecx
push edx
call fcn.10022cf6
add esp, 8
mov edx, dword [esp + 0x44]
test edx, edx
je 0x10001d02
mov ecx, dword [esp + 0x4c]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x100014a2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push ecx
push edx
call fcn.10022cf6
add esp, 8
jmp 0x10001d02
push 0x10055fc0
push 0x10055fd0
lea eax, [esp + 0x70]
push str._s_s_Gain_Image0
push eax
call fcn.10002f90
push esi
lea edx, [esp + 0x34]
lea ecx, [esp + 0x7c]
call fcn.10003ea0
add esp, 0x14
test al, al
jne 0x1000159f
mov edx, dword [esp + 0x20]
mov dword [esp + 0x1c], 0xfffffffe
test edx, edx
je 0x10001524
mov ecx, dword [esp + 0x28]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x1000151a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push ecx
push edx
call fcn.10022cf6
add esp, 8
mov edx, dword [esp + 0x38]
test edx, edx
je 0x1000155d
mov ecx, dword [esp + 0x40]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x10001553
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push ecx
push edx
call fcn.10022cf6
add esp, 8
mov edx, dword [esp + 0x44]
test edx, edx
je 0x10001d02
mov ecx, dword [esp + 0x4c]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x10001590
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push ecx
push edx
call fcn.10022cf6
add esp, 8
jmp 0x10001d02
push 0x10055fc0
push 0x10055fd0
lea eax, [esp + 0x70]
push str._s_s_Gain_Image1
push eax
call fcn.10002f90
push esi
lea edx, [esp + 0x40]
lea ecx, [esp + 0x7c]
call fcn.10003ea0
mov edx, dword [esp + 0x40]
add esp, 0x14
test al, al
jne 0x100016c6
mov dword [esp + 0x1c], 0xfffffffe
test edx, edx
je 0x10001612
mov ecx, dword [esp + 0x34]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x10001608
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push ecx
push edx
call fcn.10022cf6
add esp, 8
mov edx, dword [esp + 0x20]
test edx, edx
je 0x1000164b
mov ecx, dword [esp + 0x28]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x10001641
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push ecx
push edx
call fcn.10022cf6
add esp, 8
mov edx, dword [esp + 0x38]
test edx, edx
je 0x10001684
mov ecx, dword [esp + 0x40]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x1000167a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push ecx
push edx
call fcn.10022cf6
add esp, 8
mov edx, dword [esp + 0x44]
test edx, edx
je 0x10001d02
mov ecx, dword [esp + 0x4c]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x100016b7
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push ecx
push edx
call fcn.10022cf6
add esp, 8
jmp 0x10001d02
movzx esi, word [ebp + 0x1c]
mov ecx, dword [esp + 0x20]
push 0x3e7
push edi
mov edi, dword [esp + 0x4c]
push ebx
push esi
push dword [0x100560d4]
push dword [esp + 0x4c]
push edi
call fcn.10004d00
add esp, 0x1c
lea eax, [esp + 0x68]
push 0x10055fc0
push 0x10055fd0
push str._s_s_Pixel_Map
push eax
call fcn.10002f90
movsd xmm0, qword [0x10050260]
lea eax, [esp + 0x78]
mov ecx, dword [0x100560d4]
add esp, 8
mov edx, esi
movsd qword [esp], xmm0
push eax
movzx eax, word [ebp + 0x14]
push eax
push ebx
call fcn.10006070
mov ecx, dword [esp + 0x40]
add esp, 0x14
test al, al
jne 0x1000182a
mov dword [esp + 0x1c], 0xfffffffd
test ecx, ecx
je 0x1000177a
mov edx, dword [esp + 0x34]
mov eax, ecx
sub edx, ecx
and edx, 0xfffffffe
cmp edx, 0x1000
jb 0x10001770
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push edx
push ecx
call fcn.10022cf6
add esp, 8
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x100017b3
mov edx, dword [esp + 0x28]
mov eax, ecx
sub edx, ecx
and edx, 0xfffffffe
cmp edx, 0x1000
jb 0x100017a9
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push edx
push ecx
call fcn.10022cf6
add esp, 8
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x100017ec
mov edx, dword [esp + 0x40]
mov eax, ecx
sub edx, ecx
and edx, 0xfffffffe
cmp edx, 0x1000
jb 0x100017e2
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push edx
push ecx
call fcn.10022cf6
add esp, 8
test edi, edi
je 0x10001d02
mov ecx, dword [esp + 0x4c]
mov eax, edi
sub ecx, edi
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x1000181b
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push ecx
push edi
call fcn.10022cf6
add esp, 8
jmp 0x10001d02
test ecx, ecx
je 0x1000185f
mov edx, dword [esp + 0x34]
mov eax, ecx
sub edx, ecx
and edx, 0xfffffffe
cmp edx, 0x1000
jb 0x10001855
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push edx
push ecx
call fcn.10022cf6
add esp, 8
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x10001898
mov edx, dword [esp + 0x28]
mov eax, ecx
sub edx, ecx
and edx, 0xfffffffe
cmp edx, 0x1000
jb 0x1000188e
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push edx
push ecx
call fcn.10022cf6
add esp, 8
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x100018d1
mov edx, dword [esp + 0x40]
mov eax, ecx
sub edx, ecx
and edx, 0xfffffffe
cmp edx, 0x1000
jb 0x100018c7
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push edx
push ecx
call fcn.10022cf6
add esp, 8
test edi, edi
je 0x10001bcb
mov ecx, dword [esp + 0x4c]
mov eax, edi
sub ecx, edi
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x10001900
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d43
push ecx
push edi
jmp 0x10001bc3
lea eax, [esp + 0x178]
push eax
call fcn.10025880
add esp, 0xc
mov dword [esp + 0x2c], 0
lea eax, [esp + 0x170]
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x20], 0
push 0x10055fc0
push 0x10055fd0
push str._s_s_Offset_Image
push eax
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
call fcn.10002f90
push 0
lea edx, [esp + 0x40]
lea ecx, [esp + 0x184]
call fcn.10003ea0
add esp, 0x14
test al, al
jne 0x100019c6
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x1c], 0xffffffff
test edx, edx
je 0x10001d02
mov ecx, dword [esp + 0x34]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x100019b7
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d48
push ecx
push edx
call fcn.10022cf6
add esp, 8
jmp 0x10001d02
push 0x10055fc0
push 0x10055fd0
lea eax, [esp + 0x178]
push str._s_s_Gain_Image
push eax
call fcn.10002f90
push 0
lea edx, [esp + 0x34]
lea ecx, [esp + 0x184]
call fcn.10003ea0
add esp, 0x14
test al, al
jne 0x10001a82
mov edx, dword [esp + 0x20]
mov dword [esp + 0x1c], 0xfffffffe
test edx, edx
je 0x10001a40
mov ecx, dword [esp + 0x28]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x10001a36
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d48
push ecx
push edx
call fcn.10022cf6
add esp, 8
mov edx, dword [esp + 0x2c]
test edx, edx
je 0x10001d02
mov ecx, dword [esp + 0x34]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x10001a73
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d48
push ecx
push edx
call fcn.10022cf6
add esp, 8
jmp 0x10001d02
mov esi, dword [esp + 0x2c]
mov edx, esi
push edi
mov edi, dword [esp + 0x24]
push ebx
push ecx
mov ecx, edi
call fcn.10005ae0
add esp, 0xc
lea eax, [esp + 0x170]
push 0x10055fc0
push 0x10055fd0
push str._s_s_Pixel_Map
push eax
call fcn.10002f90
movsd xmm0, qword [0x10050260]
lea eax, [esp + 0x180]
mov ecx, dword [0x100560d4]
add esp, 8
mov edx, ebx
movsd qword [esp], xmm0
push eax
movzx eax, word [ebp + 0x14]
push eax
call fcn.1000a3a0
add esp, 0x10
test al, al
jne 0x10001b61
mov dword [esp + 0x1c], 0xfffffffd
test edi, edi
je 0x10001b23
mov ecx, dword [esp + 0x28]
mov eax, edi
sub ecx, edi
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x10001b19
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d48
push ecx
push edi
call fcn.10022cf6
add esp, 8
test esi, esi
je 0x10001d02
mov ecx, dword [esp + 0x34]
mov eax, esi
sub ecx, esi
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x10001b52
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d48
push ecx
push esi
call fcn.10022cf6
add esp, 8
jmp 0x10001d02
test edi, edi
je 0x10001b96
mov ecx, dword [esp + 0x28]
mov eax, edi
sub ecx, edi
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x10001b8c
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d48
push ecx
push edi
call fcn.10022cf6
add esp, 8
test esi, esi
je 0x10001bcb
mov ecx, dword [esp + 0x34]
mov eax, esi
sub ecx, esi
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x10001bc1
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d48
push ecx
push esi
call fcn.10022cf6
add esp, 8
movzx eax, word [ebp + 0x14]
xor edx, edx
mov esi, dword [0x100560d4]
mov dword [esp + 0x5c], esi
test eax, eax
je 0x10001d02
xor ecx, ecx
mov dword [esp + 0x54], esi
mov dword [esp + 0x50], ecx
mov dword [esp + 0x58], eax
xor edi, edi
test ebx, ebx
je 0x10001c7a
cmp ebx, 8
jb 0x10001c7a
cmp dword [0x10055540], 2
jl 0x10001c7a
mov eax, ebx
and eax, 0x80000007
jns 0x10001c1b
dec eax
or eax, 0xfffffff8
inc eax
movd xmm0, edx
mov ecx, ebx
pshufd xmm1, xmm0, 0
sub ecx, eax
mov eax, dword [esp + 0x54]
movaps xmm2, xmm1
nop
pmovsxwd xmm0, qword [eax]
pminsd xmm1, xmm0
pmovsxwd xmm0, qword [eax + 8]
add edi, 8
lea eax, [eax + 0x10]
pminsd xmm2, xmm0
cmp edi, ecx
jl 0x10001c30
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x58]
pminsd xmm1, xmm2
movaps xmm0, xmm1
psrldq xmm0, 8
pminsd xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 4
pminsd xmm1, xmm0
movd edx, xmm1
cmp edi, ebx
jge 0x10001ca8
lea eax, [edi + ecx]
lea ecx, [esi + eax*2]
mov esi, ebx
sub esi, edi
movsx eax, word [ecx]
lea ecx, [ecx + 2]
cmp edx, eax
cmovle eax, edx
mov edx, eax
sub esi, 1
jne 0x10001c88
mov esi, dword [0x100560d4]
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x58]
lea edi, [ebx + ebx]
add ecx, ebx
add dword [esp + 0x54], edi
sub eax, 1
mov dword [esp + 0x50], ecx
mov dword [esp + 0x58], eax
jne 0x10001bf1
test edx, edx
jns 0x10001d02
movzx eax, word [ebp + 0x14]
nop word [eax + eax]
test ebx, ebx
je 0x10001cf3
mov eax, esi
mov ecx, ebx
movzx esi, dx
nop dword [eax + eax]
sub word [eax], si
lea eax, [eax + 2]
sub ecx, 1
jne 0x10001ce0
mov esi, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
add esi, edi
sub eax, 1
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], eax
jne 0x10001cd0
mov eax, dword [esp + 0x64]
mov esi, dword [0x100560d4]
test eax, eax
je 0x10001d2a
mov cx, word [esi]
lea esi, [esi + 2]
movzx edx, byte [esi - 1]
shl cx, 8
or dx, cx
mov word [esi - 2], dx
sub eax, 1
jne 0x10001d10
mov ecx, dword [esp + 0x27c]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100229ab
mov esp, ebp
pop ebp
ret
call fcn.10028aca
call fcn.10028aca
int3