Function at 0x512a10
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 0x512a3c
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 [0xbdc120]
push 0x239
mov esi, eax
add esi, dword [0xbdc11c]
push ebx
call fcn.004b6100
push 0x23c
add esi, eax
push ebx
mov dword [esp + 0x4c], esi
call fcn.004b6100
mov dword [esp + 0x40], eax
mov eax, dword [ebx + 0xf4]
add eax, dword [ebx + 0x120]
cdq
idiv dword [0xbdc128]
mov ecx, dword [ebx + 0x284]
mov edi, eax
add edi, dword [0xbdc124]
mov dword [esp + 0x10], edi
test ecx, ecx
js 0x512ec8
cmp ecx, 0x1194
jge 0x512ec8
imul eax, ecx, 0x2c
mov ecx, 0xa
mov dword [esp + 0x2c], ecx
add eax, 0xb94b0c
mov dword [esp + 0x3c], eax
mov eax, dword [eax]
mov dword [esp + 0x50], eax
test eax, eax
js 0x512ea5
cmp eax, 0x1194
jge 0x512ea5
mov ebx, dword [eax*4 + 0x20a514c]
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x24], 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 0x512ea1
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 0x512b4f
cmp esi, dword [eax + 0x10]
jge 0x512b51
mov eax, ecx
cmp eax, ecx
je 0x512e8a
mov ecx, dword [eax + 0x54]
mov edx, edi
mov eax, dword [esp + 0x40]
movzx eax, ax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x44]
movzx esi, ax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], edx
test ecx, ecx
js 0x512e8a
cmp ecx, 0x100
jge 0x512e8a
imul eax, ecx, 0x4c
cmp dword [eax + 0x6460e4], ecx
lea edi, [eax + 0x6460e4]
jne 0x512e86
test edi, edi
je 0x512e86
mov eax, dword [edi + 0x38]
cmp eax, 0xffffffff
je 0x512bda
cmp dword [edi + 0x30], 2
jne 0x512bd4
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 0x512bda
mov edx, eax
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x3c]
cmp eax, 0xffffffff
je 0x512be9
movzx eax, ax
mov dword [esp + 0x1c], eax
mov eax, dword [edi + 0x40]
cmp eax, 0xffffffff
je 0x512bf8
movzx eax, ax
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x44]
xor esi, esi
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, esi
movzx eax, cx
mov dword [esp + 0x30], 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 0x512c4b
movzx eax, byte [esi + 5]
cmp eax, dword [edi + 4]
je 0x512cef
inc ecx
add esi, 0x1c
cmp ecx, 0x20
jl 0x512c36
xor ebx, ebx
nop word [eax + eax]
mov eax, dword [esp + 0x24]
mov ecx, edx
mov dword [esp + 0x30], 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 0x512cdb
cmp al, 2
jne 0x512e14
push 0
mov dword [esp + 0x34], 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 0x512e14
mov edx, dword [esp + 0x14]
add ebx, 0x1c
cmp ebx, 0x380
jl 0x512c60
jmp 0x512e86
movzx eax, bl
cmp dword [esp + 0x28], eax
jne 0x512d30
mov eax, dword [esp + 0x1c]
cmp ax, word [esi + 0x14]
jb 0x512e86
mov eax, dword [esp + 0x20]
cmp ax, word [esi + 0x16]
jb 0x512e86
mov eax, dword [esp + 0x30]
cmp ax, word [esi + 0x18]
jb 0x512e86
mov eax, dword [esp + 0x48]
cmp ax, word [esi + 0x1a]
jb 0x512e86
mov ebx, dword [esp + 0x24]
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 + 0x30], 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 0x512e0e
mov ebx, dword [esp + 0x14]
push 0
mov dword [esp + 0x34], 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 0x512e86
mov ebx, dword [esp + 0x24]
mov dl, byte [esp + 0xc]
mov dh, byte [esp + 0xd]
mov cl, byte [esp + 0x28]
mov edi, dword [esp + 0x30]
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 0x512e4a
mov eax, dword [esp + 0x14]
jmp 0x512dde
mov dl, byte [esp + 0xe]
mov al, byte [esp + 0x28]
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 + 0x34]
mov byte [esi + 5], bl
movzx eax, bl
mov ebx, dword [esp + 0x28]
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 + 0x28]
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 + 0x2c]
mov eax, dword [esp + 0x3c]
add eax, 4
sub ecx, 1
mov dword [esp + 0x3c], eax
mov dword [esp + 0x2c], ecx
jne 0x512ac5
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 0x512efc
cmp esi, dword [eax + 0x10]
jge 0x512efe
mov eax, ecx
cmp eax, ecx
je 0x51308e
mov ecx, dword [eax + 0x54]
mov eax, dword [esp + 0x40]
movzx edx, ax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x20], edx
movzx edx, ax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x24], edx
test ecx, ecx
js 0x51308e
cmp ecx, 0x100
jge 0x51308e
imul eax, ecx, 0x4c
cmp dword [eax + 0x6460e4], ecx
lea edi, [eax + 0x6460e4]
jne 0x51308e
test edi, edi
je 0x51308e
mov eax, dword [edi + 0x38]
cmp eax, 0xffffffff
je 0x512f7f
cmp dword [edi + 0x30], 2
jne 0x512f7b
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 0x512f7f
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x3c]
cmp eax, 0xffffffff
je 0x512f8e
movzx eax, ax
mov dword [esp + 0x24], eax
mov eax, dword [edi + 0x40]
cmp eax, 0xffffffff
je 0x512f9d
movzx eax, ax
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x44]
xor edx, edx
mov esi, dword [ebx + 0x624]
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, edx
movzx eax, cx
mov dword [esp + 0x50], eax
movzx eax, ax
mov dword [esp + 0x40], eax
mov eax, dword [edi + 0x48]
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, edx
movzx eax, cx
xor ecx, ecx
mov dword [esp + 0x48], eax
movzx eax, ax
mov dword [esp + 0x3c], eax
nop dword [eax + eax]
mov dl, byte [esi + 4]
cmp dl, 0xff
je 0x512ff5
movzx eax, byte [esi + 5]
cmp eax, dword [edi + 4]
je 0x5130ac
inc ecx
add esi, 0x1c
cmp ecx, 0x20
jl 0x512fe0
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 + 0x44], 0
mov byte [esp + 0xe], al
mov byte [esp + 0xc], dl
jne 0x51307b
cmp al, 2
jne 0x5131fb
mov eax, ecx
push 0
mov dword [esp + 0x48], 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 0x5131f7
add ebx, 0x1c
cmp ebx, 0x380
jl 0x513000
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 + 0x2c], eax
jne 0x5130dd
mov edx, dword [esp + 0x24]
cmp dx, word [esi + 0x14]
jb 0x51308e
mov edx, dword [esp + 0x20]
cmp dx, word [esi + 0x16]
jb 0x51308e
mov eax, dword [esp + 0x50]
cmp ax, word [esi + 0x18]
jb 0x51308e
mov eax, dword [esp + 0x48]
cmp ax, word [esi + 0x1a]
jb 0x51308e
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 0x513185
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 0x51308e
mov dl, byte [esp + 0xf]
mov eax, edi
mov dh, byte [esp + 0xe]
mov cl, byte [esp + 0x2c]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x10]
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x24]
mov byte [esi + 6], dh
mov dh, byte [esp + 0xd]
mov byte [esi + 4], cl
mov byte [esi + 5], dl
mov word [esi + 0x14], ax
mov eax, dword [esp + 0x20]
mov byte [esi + 7], dh
mov dh, byte [esp + 0xc]
push ecx
push dword [esp + 0x14]
mov word [esi + 0x16], ax
mov byte [esi + 8], dh
movzx eax, dl
mov edi, dword [esp + 0x48]
mov ecx, 0x6460e0
push 0
push 0
mov word [esi + 0x18], di
mov edi, dword [esp + 0x4c]
push eax
push ebx
mov word [esi + 0x1a], di
call fcn.00478bb0
push esi
push ebx
mov ecx, 0x6460e0
call fcn.00477580
jmp 0x51308e
mov dl, byte [esp + 0xc]
mov al, byte [esp + 0x2c]
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 + 0x44]
mov byte [esi + 4], al
mov dword [esi + 0xc], edx
mov edx, dword [esp + 0x24]
mov dword [esi + 0x10], ecx
push eax
movzx eax, byte [esp + 0x10]
mov word [esi + 0x14], dx
mov edx, dword [esp + 0x24]
mov word [esi + 0x16], dx
push ecx
jmp 0x5131c6