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

Disassembly:
sub esp, 0xb0
xor eax, eax
push ebx
push ebp
mov ebp, dword [esp + 0xc8]
mov cx, word [ebp + 4]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
or eax, 0xffffffff
mov word [esp + 8], ax
mov word [esp + 0xa], ax
push esi
lea eax, [ebp + 4]
xor edx, edx
cmp cx, word [ebp + 8]
lea esi, [ebp + 8]
sete dl
mov ecx, 1
mov word [esp + 0x12], cx
mov word [esp + 0x10], cx
mov ecx, dword [esp + 0xc4]
push edi
movzx edi, word [ecx + 0xa]
mov ecx, dword [esp + 0xc4]
mov dword [esp + 0x18], edx
lea edx, [esp + 0x14]
push edx
lea ebx, [esp + 0xa4]
call fcn.00411f30
mov ecx, dword [esp + 0xc8]
lea eax, [esp + 0x18]
push eax
lea ebx, [esp + 0xb8]
mov eax, esi
call fcn.00411f30
mov ebx, dword [esp + 0xd0]
lea esi, [esp + 0x84]
lea edi, [esp + 0xa8]
call fcn.00411fe0
lea esi, [esp + 0x74]
lea edi, [esp + 0xb8]
call fcn.00411fe0
movzx edx, word [ebp + 6]
movzx eax, word [ebp + 4]
mov esi, dword [esp + 0xcc]
lea ecx, [esp + 0x70]
push ecx
push edx
push eax
push esi
call fcn.00412e60
mov ecx, dword [esp + 0x80]
add esp, 0x18
test byte [ecx], 1
je 0x412583
movzx eax, word [ebp + 6]
movzx ecx, word [ebp + 4]
lea edx, [esp + 0x8c]
push edx
push eax
push ecx
push esi
call fcn.0040eea0
add esp, 0x10
movzx eax, word [ebp + 0xa]
movzx ecx, word [ebp + 8]
lea edx, [esp + 0x68]
push edx
push eax
push ecx
push esi
call fcn.00412e60
mov edx, dword [esp + 0x78]
add esp, 0x10
test byte [edx], 1
je 0x4125bf
movzx ecx, word [ebp + 0xa]
movzx edx, word [ebp + 8]
lea eax, [esp + 0x90]
push eax
push ecx
push edx
push esi
call fcn.0040eea0
add esp, 0x10
mov eax, dword [ebp]
mov ecx, dword [eax + 0x10]
mov eax, dword [esp + 0x84]
sub eax, dword [esp + 0x7c]
mov dword [esp + 0x14], ecx
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x88]
sub eax, dword [esp + 0x80]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x74]
sub eax, dword [esp + 0x6c]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x78]
sub eax, dword [esp + 0x70]
cdq
sub eax, edx
sar eax, 1
cmp word [esp + 0x18], 0
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0xcc]
jne 0x4126e2
lea edx, [esp + 0x50]
push edx
push ebp
push eax
push ebx
push esi
call fcn.00412360
movzx edx, word [ebp + 4]
mov edi, dword [esp + 0x64]
lea ecx, [esp + 0x60]
push ecx
push edx
push esi
call fcn.00412e90
mov eax, dword [ebp + 0x14]
add esp, 0x20
test eax, eax
je 0x41266c
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 0x54]
push ecx
push eax
push edx
push ebx
push esi
call fcn.00412360
add esp, 0x14
jmp 0x41268b
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x8c]
lea ecx, [eax + eax]
mov dword [esp + 0x54], ecx
jne 0x41268b
mov word [esp + 0x10], 0
movzx ecx, word [ebp + 8]
lea eax, [esp + 0x4c]
push eax
push ecx
push esi
call fcn.00412e90
mov eax, dword [ebp + 0x18]
add esp, 0xc
test eax, eax
je 0x4126c3
lea edx, [esp + 0x14]
push edx
push eax
mov eax, dword [esp + 0x54]
push eax
push ebx
push esi
call fcn.00412360
mov ebx, dword [esp + 0x28]
add esp, 0x14
jmp 0x412791
mov ecx, dword [esp + 0x14]
xor ebx, ebx
cmp ecx, dword [esp + 0x90]
jne 0x412791
mov word [esp + 0x12], 2
jmp 0x412791
lea edx, [esp + 0x54]
push edx
push ebp
push eax
mov edi, ebx
push edi
push esi
call fcn.00412360
movzx edx, word [ebp + 6]
mov ebx, dword [esp + 0x68]
lea ecx, [esp + 0x60]
push ecx
push edx
push esi
call fcn.00412ed0
mov eax, dword [ebp + 0x14]
add esp, 0x20
test eax, eax
je 0x412727
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 0x50]
push ecx
push eax
push edx
push edi
push esi
call fcn.00412360
add esp, 0x14
jmp 0x412746
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x8c]
lea ecx, [eax + eax]
mov dword [esp + 0x50], ecx
jne 0x412746
mov word [esp + 0x10], 1
movzx ecx, word [ebp + 0xa]
lea eax, [esp + 0x4c]
push eax
push ecx
push esi
call fcn.00412ed0
mov eax, dword [ebp + 0x18]
add esp, 0xc
test eax, eax
je 0x41277b
lea edx, [esp + 0x14]
push edx
push eax
mov eax, dword [esp + 0x54]
push eax
push edi
push esi
call fcn.00412360
mov edi, dword [esp + 0x28]
add esp, 0x14
jmp 0x412791
mov ecx, dword [esp + 0x14]
xor edi, edi
cmp ecx, dword [esp + 0x90]
jne 0x412791
mov word [esp + 0x12], 3
mov edx, dword [esp + 0xc8]
movzx eax, word [edx + 0xa]
cmp eax, 3
ja case.default.0x4127a5
jmp dword [eax*4 + 0x412c44]
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x80]
add ecx, eax
mov eax, dword [esp + 0x50]
add eax, edx
mov edx, dword [esp + 0x6c]
add ebx, edx
mov edx, dword [esp + 0x70]
add edi, edx
cmp word [esp + 0x10], 0xffff
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], edi
je 0x4127f1
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], eax
jmp 0x41282e
cmp word [esp + 0x18], 1
movsx edx, word [ebp + 0xc]
mov dword [esp + 0x40], eax
jne 0x412819
lea esi, [ecx + edx*4]
add esi, edx
movsx edx, word [ebp + 0xe]
add eax, edx
lea eax, [eax + edx*4]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x20], eax
jmp 0x412826
lea ecx, [ecx + edx*4]
add ecx, edx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], ecx
cmp word [esp + 0x12], 0xffff
je 0x412843
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], edi
jmp case.default.0x4127a5
cmp word [esp + 0x18], 1
movsx eax, word [ebp + 0x10]
mov dword [esp + 0x30], edi
lea edx, [ebx + eax*4]
jne 0x412877
add edx, eax
movsx eax, word [ebp + 0x12]
lea ecx, [eax + edi]
lea eax, [ecx + eax*4]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], eax
jmp case.default.0x4127a5
add eax, edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edi
jmp case.default.0x4127a5
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x84]
sub eax, dword [esp + 0x50]
mov esi, dword [esp + 0x70]
add edx, ecx
mov ecx, dword [esp + 0x74]
sub ecx, edi
add ebx, esi
cmp word [esp + 0x10], 0xffff
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ebx
je 0x4128d4
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], edx
jmp 0x41292b
cmp word [esp + 0x18], 1
jne 0x412903
movsx esi, word [ebp + 0xc]
lea edi, [edx + esi*4]
add edi, esi
movsx esi, word [ebp + 0xe]
mov dword [esp + 0x40], edi
mov edi, esi
neg edi
add edi, edi
add edi, edi
sub edi, esi
mov dword [esp + 0x3c], eax
add eax, edi
mov dword [esp + 0x1c], eax
jmp 0x412923
movsx esi, word [ebp + 0xe]
lea esi, [esi + esi*4]
mov edi, eax
sub edi, esi
movsx esi, word [ebp + 0xc]
mov dword [esp + 0x40], edx
add edx, esi
lea edx, [edx + esi*4]
mov dword [esp + 0x3c], edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x48], edx
mov dword [esp + 0x44], eax
cmp word [esp + 0x12], 0xffff
je 0x412940
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], ebx
jmp case.default.0x4127a5
cmp word [esp + 0x18], 1
jne 0x41297a
movsx eax, word [ebp + 0x10]
lea edx, [ebx + eax*4]
add edx, eax
movsx eax, word [ebp + 0x12]
mov dword [esp + 0x30], edx
mov edx, eax
neg edx
add edx, edx
add edx, edx
sub edx, eax
mov dword [esp + 0x2c], ecx
add ecx, edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ebx
jmp case.default.0x4127a5
movsx eax, word [ebp + 0x12]
lea eax, [eax + eax*4]
mov edx, ecx
sub edx, eax
movsx eax, word [ebp + 0x10]
mov dword [esp + 0x2c], edx
lea edx, [eax + ebx]
lea eax, [edx + eax*4]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], eax
jmp case.default.0x4127a5
mov edx, dword [esp + 0x84]
mov eax, dword [esp + 0x88]
sub edx, dword [esp + 0x54]
sub eax, dword [esp + 0x50]
mov esi, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
sub esi, ebx
sub ecx, edi
cmp word [esp + 0x10], 0xffff
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], ecx
je 0x4129ec
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], eax
jmp 0x412a2f
cmp word [esp + 0x18], 1
movsx edi, word [ebp + 0xc]
mov dword [esp + 0x40], eax
lea edi, [edi + edi*4]
jne 0x412a1d
mov ebx, edx
sub ebx, edi
movsx edi, word [ebp + 0xe]
mov dword [esp + 0x3c], ebx
mov ebx, edi
neg ebx
add ebx, ebx
add ebx, ebx
sub ebx, edi
add eax, ebx
mov dword [esp + 0x20], eax
jmp 0x412a27
sub edx, edi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], edx
cmp word [esp + 0x12], 0xffff
je 0x412a44
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], ecx
jmp case.default.0x4127a5
cmp word [esp + 0x18], 1
movsx eax, word [ebp + 0x10]
mov dword [esp + 0x30], ecx
lea eax, [eax + eax*4]
jne 0x412a68
mov edx, esi
sub edx, eax
movsx eax, word [ebp + 0x12]
mov dword [esp + 0x34], esi
jmp 0x412b6b
sub esi, eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x34], esi
jmp 0x412b7f
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x88]
sub eax, dword [esp + 0x54]
add edx, ecx
mov ecx, dword [esp + 0x6c]
add edi, ecx
mov ecx, dword [esp + 0x78]
sub ecx, ebx
cmp word [esp + 0x10], 0xffff
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ecx
je 0x412abe
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], eax
jmp 0x412b15
cmp word [esp + 0x18], 1
jne 0x412ae8
movsx esi, word [ebp + 0xc]
lea esi, [esi + esi*4]
mov ebx, eax
sub ebx, esi
movsx esi, word [ebp + 0xe]
mov dword [esp + 0x3c], edx
add edx, esi
lea edx, [edx + esi*4]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x1c], edx
jmp 0x412b0d
movsx esi, word [ebp + 0xe]
lea ebx, [edx + esi*4]
add ebx, esi
movsx esi, word [ebp + 0xc]
mov dword [esp + 0x3c], ebx
mov ebx, esi
neg ebx
add ebx, ebx
add ebx, ebx
sub ebx, esi
mov dword [esp + 0x40], eax
add eax, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], edx
cmp word [esp + 0x12], 0xffff
je 0x412b27
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], ecx
jmp case.default.0x4127a5
cmp word [esp + 0x18], 1
jne 0x412b56
movsx eax, word [ebp + 0x10]
lea eax, [eax + eax*4]
mov edx, ecx
sub edx, eax
movsx eax, word [ebp + 0x12]
mov dword [esp + 0x30], edx
lea edx, [eax + edi]
lea eax, [edx + eax*4]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], eax
jmp 0x412b7f
movsx eax, word [ebp + 0x12]
lea edx, [edi + eax*4]
add edx, eax
movsx eax, word [ebp + 0x10]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edi
mov dword [esp + 0x2c], edx
mov edx, eax
neg edx
add edx, edx
add edx, edx
sub edx, eax
add ecx, edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x38], ecx
mov eax, dword [ebp]
mov ecx, dword [eax]
mov ebx, dword [esp + 0xd4]
push ecx
push 1
push ebx
call fcn.004070a0
mov edx, dword [ebp]
lea ecx, [esp + 0xa0]
mov word [esp + 0xa0], 2
mov word [esp + 0xa2], 0x81
mov dword [esp + 0xa4], 1
mov eax, dword [edx]
push ecx
push ebx
mov dword [esp + 0xb0], eax
call fcn.00407060
lea edx, [esp + 0x30]
push edx
push ebx
call fcn.00406f00
add esp, 0x1c
xor edi, edi
movzx eax, di
movzx edx, word [esp + eax*2 + 0x10]
cmp dx, 0xffff
je 0x412c09
lea ecx, [esp + eax*8 + 0x58]
mov eax, dword [esp + 0xc8]
mov si, word [eax + 0xa]
push ebx
call fcn.00412060
add esp, 4
jmp 0x412c23
test di, di
jne 0x412c15
lea ecx, [esp + 0x3c]
push ecx
jmp 0x412c1a
lea edx, [esp + 0x2c]
push edx
push ebx
call fcn.00406f00
add esp, 8
add edi, 1
cmp di, 2
jb 0x412be1
push ebx
call fcn.004070d0
add esp, 4
pop edi
pop esi
pop ebp
xor ax, ax
pop ebx
add esp, 0xb0
ret