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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov ebx, dword [ebx*4 + 0x20a514c]
mov dword [esp + 0x18], ebx
cmp word [ebx + 0x78], 1
je 0x51221c
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0xf4]
add eax, dword [ebx + 0x120]
cdq
idiv dword [0xbdc110]
push 0x23d
mov esi, eax
add esi, dword [0xbdc10c]
push ebx
call fcn.004b6100
add esi, eax
mov eax, dword [ebx + 0xf4]
add eax, dword [ebx + 0x120]
cdq
idiv dword [0xbdc118]
mov dword [esp + 0x40], esi
mov edi, eax
mov eax, dword [ebx + 0x284]
add edi, dword [0xbdc114]
mov dword [esp + 0x10], edi
test eax, eax
js 0x512698
cmp eax, 0x1194
jge 0x512698
imul eax, eax, 0x2c
mov ecx, 0xa
mov dword [esp + 0x28], ecx
add eax, 0xb94b0c
mov dword [esp + 0x3c], eax
mov eax, dword [eax]
mov dword [esp + 0x50], eax
test eax, eax
js 0x512675
cmp eax, 0x1194
jge 0x512675
mov ebx, dword [eax*4 + 0x20a514c]
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x20], ebx
movzx esi, word [eax + 8]
movsx eax, word [ebx + 0x146]
push eax
movsx eax, word [ebx + 0x144]
push eax
movsx eax, word [ecx + 0x146]
push eax
movsx eax, word [ecx + 0x144]
push eax
push esi
call fcn.005080e0
test al, al
je 0x512671
lea eax, [esp + 0x38]
mov dword [esp + 0x38], esi
push eax
lea eax, [esp + 0x60]
mov ecx, 0xbf0bd4
push eax
call fcn.00405650
mov eax, dword [esp + 0x64]
mov ecx, dword [0xbf0bd4]
cmp byte [eax + 0xd], 0
jne 0x51231f
cmp esi, dword [eax + 0x10]
jge 0x512321
mov eax, ecx
cmp eax, ecx
je 0x51265a
mov ecx, dword [eax + 0x54]
mov edx, edi
mov eax, dword [esp + 0x40]
movzx eax, ax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], edx
test ecx, ecx
js 0x51265a
cmp ecx, 0x100
jge 0x51265a
imul eax, ecx, 0x4c
cmp dword [eax + 0x6460e4], ecx
lea edi, [eax + 0x6460e4]
jne 0x512656
test edi, edi
je 0x512656
mov eax, dword [edi + 0x38]
cmp eax, 0xffffffff
je 0x51239f
cmp dword [edi + 0x30], 2
jne 0x512399
push 0
call fcn.0052d9f5
mov dword [esp + 0x50], edx
add esp, 4
mov edx, dword [edi + 0x38]
add edx, eax
mov dword [esp + 0x14], edx
jmp 0x51239f
mov edx, eax
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x3c]
cmp eax, 0xffffffff
je 0x5123ae
movzx eax, ax
mov dword [esp + 0x1c], eax
mov eax, dword [edi + 0x40]
xor esi, esi
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, esi
movzx eax, cx
mov dword [esp + 0x2c], eax
movzx eax, ax
mov dword [esp + 0x30], eax
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, esi
movzx eax, cx
mov dword [esp + 0x44], eax
movzx eax, ax
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0x48]
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, esi
mov esi, dword [ebx + 0x624]
movzx eax, cx
xor ecx, ecx
mov dword [esp + 0x48], eax
movzx eax, ax
mov dword [esp + 0x38], eax
mov bl, byte [esi + 4]
cmp bl, 0xff
je 0x51241b
movzx eax, byte [esi + 5]
cmp eax, dword [edi + 4]
je 0x5124bf
inc ecx
add esi, 0x1c
cmp ecx, 0x20
jl 0x512406
xor ebx, ebx
nop word [eax + eax]
mov eax, dword [esp + 0x20]
mov ecx, edx
mov dword [esp + 0x2c], 0
mov esi, dword [eax + 0x624]
mov al, byte [edi + 0x34]
add esi, ebx
mov ah, byte [edi + 0x2c]
mov byte [esp + 0xc], al
mov al, byte [edi + 0x30]
cmp byte [esi + 4], 0xff
mov byte [esp + 0xe], ah
mov ah, byte [edi + 4]
mov byte [esp + 0xd], al
mov byte [esp + 0xf], ah
jne 0x5124ab
cmp al, 2
jne 0x5125e4
push 0
mov dword [esp + 0x30], edx
call fcn.0052d9f5
add esp, 4
push edx
push eax
push 0
push dword [esp + 0x20]
call fcn.0052d9b0
add esp, 0x10
fstp qword [esp + 0x48]
movsd xmm0, qword [esp + 0x48]
call fcn.00546020
mov ecx, eax
test ecx, ecx
jg 0x5125e4
mov edx, dword [esp + 0x14]
add ebx, 0x1c
cmp ebx, 0x380
jl 0x512430
jmp 0x512656
movzx eax, bl
cmp dword [esp + 0x24], eax
jne 0x512500
mov eax, dword [esp + 0x1c]
cmp ax, word [esi + 0x14]
jb 0x512656
mov eax, dword [esp + 0x2c]
cmp ax, word [esi + 0x16]
jb 0x512656
mov eax, dword [esp + 0x44]
cmp ax, word [esi + 0x18]
jb 0x512656
mov eax, dword [esp + 0x48]
cmp ax, word [esi + 0x1a]
jb 0x512656
mov ebx, dword [esp + 0x20]
mov ecx, 0x6460e0
push esi
push ebx
call fcn.00478000
movzx eax, byte [esi + 4]
mov ecx, 0x6460e0
push eax
movzx eax, byte [esi + 5]
push 0
push 2
push 0
push eax
push ebx
call fcn.00478bb0
xor eax, eax
mov dword [esi + 4], 0xff
mov dword [esi + 0x10], 0
mov byte [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov cl, byte [edi + 0x2c]
mov dl, byte [edi + 4]
mov dword [esp + 0x2c], eax
mov al, byte [edi + 0x34]
mov byte [esp + 0xf], al
mov al, byte [edi + 0x30]
mov byte [esp + 0xe], al
mov byte [esp + 0xd], cl
mov byte [esp + 0xc], dl
cmp al, 2
jne 0x5125de
mov ebx, dword [esp + 0x14]
push 0
mov dword [esp + 0x30], ebx
call fcn.0052d9f5
add esp, 4
push edx
push eax
push 0
push ebx
call fcn.0052d9b0
add esp, 0x10
fstp qword [esp + 0x48]
movsd xmm0, qword [esp + 0x48]
call fcn.00546020
test eax, eax
jle 0x512656
mov ebx, dword [esp + 0x20]
mov dl, byte [esp + 0xc]
mov dh, byte [esp + 0xd]
mov cl, byte [esp + 0x24]
mov edi, dword [esp + 0x2c]
mov byte [esi + 6], dh
mov dh, byte [esp + 0xe]
mov byte [esi + 7], dh
mov dh, byte [esp + 0xf]
push ecx
mov dword [esi + 0x10], eax
push eax
mov byte [esi + 4], cl
mov byte [esi + 5], dl
mov byte [esi + 8], dh
mov dword [esi + 0xc], edi
movzx eax, dl
jmp 0x51261a
mov eax, dword [esp + 0x14]
jmp 0x5125ae
mov dl, byte [esp + 0xe]
mov al, byte [esp + 0x24]
mov bl, byte [esp + 0xf]
mov byte [esi + 6], dl
mov dl, byte [esp + 0xd]
mov byte [esi + 7], dl
mov dl, byte [esp + 0xc]
push eax
mov byte [esi + 4], al
mov byte [esi + 8], dl
mov edx, dword [esp + 0x30]
mov byte [esi + 5], bl
movzx eax, bl
mov ebx, dword [esp + 0x24]
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], ecx
push ecx
mov edi, dword [esp + 0x24]
mov ecx, 0x6460e0
mov word [esi + 0x14], di
mov edi, dword [esp + 0x38]
push 0
mov word [esi + 0x16], di
mov edi, dword [esp + 0x40]
push 0
mov word [esi + 0x18], di
mov edi, dword [esp + 0x48]
push eax
push ebx
mov word [esi + 0x1a], di
call fcn.00478bb0
push esi
push ebx
mov ecx, 0x6460e0
call fcn.00477580
mov edi, dword [esp + 0x10]
mov eax, dword [ebp + 0x10]
push 1
push dword [esp + 0x54]
movzx eax, word [eax + 8]
push eax
push dword [esp + 0x24]
call fcn.00517480
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x3c]
add eax, 4
sub ecx, 1
mov dword [esp + 0x3c], eax
mov dword [esp + 0x28], ecx
jne 0x512295
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0x10]
mov ecx, 0xbf0bd4
movzx esi, word [eax + 8]
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x60]
mov dword [esp + 0x54], esi
push eax
call fcn.00405650
mov eax, dword [esp + 0x64]
mov ecx, dword [0xbf0bd4]
cmp byte [eax + 0xd], 0
jne 0x5126cc
cmp esi, dword [eax + 0x10]
jge 0x5126ce
mov eax, ecx
cmp eax, ecx
je 0x51285e
mov ecx, dword [eax + 0x54]
mov eax, dword [esp + 0x40]
movzx edx, ax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], edx
test ecx, ecx
js 0x51285e
cmp ecx, 0x100
jge 0x51285e
imul eax, ecx, 0x4c
cmp dword [eax + 0x6460e4], ecx
lea edi, [eax + 0x6460e4]
jne 0x51285e
test edi, edi
je 0x51285e
mov eax, dword [edi + 0x38]
cmp eax, 0xffffffff
je 0x512744
cmp dword [edi + 0x30], 2
jne 0x512740
push 0
call fcn.0052d9f5
mov ecx, dword [edi + 0x38]
add esp, 4
add ecx, eax
mov dword [esp + 0x54], edx
mov dword [esp + 0x10], ecx
jmp 0x512744
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x3c]
cmp eax, 0xffffffff
je 0x512753
movzx eax, ax
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x40]
xor edx, edx
cmp eax, 0xffffffff
movzx ecx, ax
mov esi, dword [ebx + 0x624]
cmove ecx, edx
movzx eax, cx
mov dword [esp + 0x50], eax
movzx eax, ax
mov dword [esp + 0x3c], eax
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, edx
movzx eax, cx
mov dword [esp + 0x48], eax
movzx eax, ax
mov dword [esp + 0x38], eax
mov eax, dword [edi + 0x48]
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, edx
movzx eax, cx
xor ecx, ecx
mov dword [esp + 0x44], eax
movzx eax, ax
mov dword [esp + 0x34], eax
nop dword [eax + eax]
mov dl, byte [esi + 4]
cmp dl, 0xff
je 0x5127c5
movzx eax, byte [esi + 5]
cmp eax, dword [edi + 4]
je 0x51287c
inc ecx
add esi, 0x1c
cmp ecx, 0x20
jl 0x5127b0
xor ebx, ebx
mov eax, dword [esp + 0x18]
mov dl, byte [edi + 0x2c]
mov ecx, dword [esp + 0x10]
mov byte [esp + 0xf], dl
mov esi, dword [eax + 0x624]
mov al, byte [edi + 0x34]
add esi, ebx
mov dl, byte [edi + 4]
mov byte [esp + 0xd], al
mov al, byte [edi + 0x30]
cmp byte [esi + 4], 0xff
mov dword [esp + 0x40], 0
mov byte [esp + 0xe], al
mov byte [esp + 0xc], dl
jne 0x51284b
cmp al, 2
jne 0x5129cb
mov eax, ecx
push 0
mov dword [esp + 0x44], eax
call fcn.0052d9f5
add esp, 4
push edx
push eax
push 0
push dword [esp + 0x1c]
call fcn.0052d9b0
add esp, 0x10
fstp qword [esp + 0x50]
movsd xmm0, qword [esp + 0x50]
call fcn.00546020
mov ecx, eax
test ecx, ecx
jg 0x5129c7
add ebx, 0x1c
cmp ebx, 0x380
jl 0x5127d0
mov ebx, dword [esp + 0x18]
mov eax, dword [ebp + 0x10]
push 1
push dword [ebp + 8]
movzx eax, word [eax + 8]
push eax
push ebx
call fcn.00517480
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
movzx eax, dl
cmp dword [esp + 0x28], eax
jne 0x5128ad
mov edx, dword [esp + 0x20]
cmp dx, word [esi + 0x14]
jb 0x51285e
mov eax, dword [esp + 0x50]
cmp ax, word [esi + 0x16]
jb 0x51285e
mov eax, dword [esp + 0x48]
cmp ax, word [esi + 0x18]
jb 0x51285e
mov eax, dword [esp + 0x44]
cmp ax, word [esi + 0x1a]
jb 0x51285e
push esi
push ebx
mov ecx, 0x6460e0
call fcn.00478000
movzx eax, byte [esi + 4]
mov ecx, 0x6460e0
push eax
movzx eax, byte [esi + 5]
push 0
push 2
push 0
push eax
push ebx
call fcn.00478bb0
mov dword [esi + 4], 0xff
xor eax, eax
mov dword [esi + 0x10], 0
mov byte [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov cl, byte [edi + 0x34]
mov dl, byte [edi + 0x2c]
mov byte [esp + 0xc], cl
mov cl, byte [edi + 0x30]
mov byte [esp + 0xe], dl
mov dl, byte [edi + 4]
mov byte [esp + 0xd], cl
mov byte [esp + 0xf], dl
cmp cl, 2
jne 0x512955
mov edi, dword [esp + 0x10]
push eax
mov dword [esp + 0x54], edi
call fcn.0052d9f5
add esp, 4
push edx
push eax
push 0
push edi
call fcn.0052d9b0
add esp, 0x10
fstp qword [esp + 0x48]
movsd xmm0, qword [esp + 0x48]
call fcn.00546020
mov dword [esp + 0x10], eax
test eax, eax
jle 0x51285e
mov dl, byte [esp + 0xf]
mov eax, edi
mov dh, byte [esp + 0xe]
mov cl, byte [esp + 0x28]
mov byte [esi + 6], dh
mov dh, byte [esp + 0xd]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x10]
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x20]
mov byte [esi + 7], dh
mov dh, byte [esp + 0xc]
mov byte [esi + 4], cl
mov byte [esi + 5], dl
push ecx
push dword [esp + 0x14]
mov word [esi + 0x14], ax
mov byte [esi + 8], dh
movzx eax, dl
mov edi, dword [esp + 0x44]
mov ecx, 0x6460e0
push 0
mov word [esi + 0x16], di
mov edi, dword [esp + 0x44]
push 0
mov word [esi + 0x18], di
mov edi, dword [esp + 0x44]
push eax
push ebx
mov word [esi + 0x1a], di
call fcn.00478bb0
push esi
push ebx
mov ecx, 0x6460e0
call fcn.00477580
jmp 0x51285e
mov dl, byte [esp + 0xc]
mov al, byte [esp + 0x28]
mov ebx, dword [esp + 0x18]
mov byte [esi + 5], dl
mov dl, byte [esp + 0xf]
mov byte [esi + 6], dl
mov dl, byte [esp + 0xe]
mov byte [esi + 7], dl
mov dl, byte [esp + 0xd]
mov byte [esi + 8], dl
mov edx, dword [esp + 0x40]
push eax
mov byte [esi + 4], al
movzx eax, byte [esp + 0x10]
mov dword [esi + 0xc], edx
mov edx, dword [esp + 0x24]
mov dword [esi + 0x10], ecx
mov word [esi + 0x14], dx
push ecx
jmp 0x51298e