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

Disassembly:
mov ecx, dword [0x98cddc]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
lea eax, [esp - 8]
cmp eax, dword [ecx + 8]
jbe 0x513038
sub esp, 0x88
mov eax, dword [esp + 0x98]
test eax, eax
je 0x512d62
mov ecx, dword [esp + 0x9c]
jmp 0x512d69
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x58], ecx
mov edx, dword [esp + 0x9c]
mov ebx, dword [esp + 0xa0]
mov ebp, dword [esp + 0x94]
mov esi, dword [esp + 0x8c]
mov edi, dword [esp + 0xa4]
mov dword [esp + 0x5c], eax
xor eax, eax
mov dword [esp + 0x54], eax
xor eax, eax
mov dword [esp + 0x44], eax
mov eax, 0xffffffff
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x5c]
jmp 0x512df7
mov edx, dword [esp + 0x9c]
mov ebx, dword [esp + 0xa0]
mov ecx, dword [esp + 0x94]
mov edi, dword [esp + 0x98]
mov ecx, dword [esp + 0x58]
mov edi, dword [esp + 0xa4]
mov dword [esp + 0x54], eax
mov dword [esp + 0x44], ebp
mov dword [esp + 0x40], esi
mov eax, dword [esp + 0x98]
mov ebp, dword [esp + 0x94]
mov esi, dword [esp + 0x8c]
mov ebp, dword [esp + 0x54]
cmp edi, ebp
jle 0x512f99
mov edi, dword [esp + 0x44]
cmp ecx, edi
jl 0x512f99
mov ecx, dword [esi + 8]
mov ecx, dword [ecx + 0x10]
mov dword [esp], esi
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebx
mov ebp, dword [esp + 0x90]
mov dword [esp + 0x18], ebp
mov ebp, dword [esp + 0x94]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
call fcn.0050e580
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
test eax, eax
je 0x512f99
cmp eax, 1
jbe 0x51302b
mov ebx, dword [esp + 0x34]
mov ebp, dword [ebx + 4]
mov esi, dword [esp + 0x44]
cmp esi, ebp
je 0x512ea1
mov edx, 1
jmp 0x512f62
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ecx
mov dword [esp + 0x70], ebx
mov edx, dword [ebx]
mov dword [esp + 0x6c], edx
mov ebp, dword [esp + 0x40]
cmp edx, ebp
mov edi, dword [esp + 0x98]
test edi, edi
je 0x512efa
mov dword [esp + 0x7c], edi
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x80], eax
mov ecx, dword [esp + 0xa0]
mov dword [esp + 0x84], ecx
lea edx, [esp + 0x7c]
mov dword [esp], edx
mov dword [esp + 4], esi
call fcn.00511fe0
mov eax, dword [esp + 0xc]
jmp 0x512f24
mov eax, dword [esp + 0x90]
mov dword [esp + 0x74], eax
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x78], ecx
lea edx, [esp + 0x74]
mov dword [esp], edx
mov dword [esp + 4], esi
call fcn.00511db0
mov eax, dword [esp + 0xc]
test eax, eax
jle 0x512f3e
mov ecx, dword [esp + 0x44]
add eax, ecx
mov ecx, dword [esp + 0x6c]
mov ebx, dword [esp + 0x40]
cmp ecx, ebx
mov ecx, dword [esp + 0x58]
jmp 0x512f4f
mov ecx, dword [esp + 0x58]
lea eax, [ecx + 1]
mov ebx, dword [esp + 0x6c]
mov ebp, dword [esp + 0x40]
cmp ebx, ebp
setne bl
mov ecx, dword [esp + 0x50]
mov edx, ebx
mov ebp, eax
mov eax, dword [esp + 0x4c]
mov ebx, dword [esp + 0x70]
mov esi, dword [ebx + 4]
test dl, dl
je 0x512f90
mov dword [esp + 0x68], esi
mov dword [esp + 0x64], ebp
test ebx, ebx
je 0x512f88
mov edi, dword [esp + 0x8c]
mov edx, dword [edi + 0x10]
inc edx
shl edx, 1
mov dword [esp + 0x48], edx
jmp 0x512fd2
xor eax, eax
xor ecx, ecx
xor edx, edx
jmp 0x512fa0
mov eax, dword [esp + 0x54]
jmp 0x512daf
add esp, 0x88
ret
mov ebx, dword [esp + 0xa8]
mov ebp, dword [ebx]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov edx, ebx
call ebp
mov eax, dword [esp + 0x54]
inc eax
mov ebp, dword [esp + 0x64]
mov esi, dword [esp + 0x68]
jmp 0x512daf
mov dword [ebx + eax*4 - 4], 0xffffffff
cmp eax, edx
jge 0x51301e
inc eax
cmp ecx, eax
jae 0x512fca
mov dword [esp], ebx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], 1
lea eax, [0x6e08a0]
mov dword [esp + 0x10], eax
call fcn.0046cad0
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x48]
mov ebp, dword [esp + 0x64]
mov esi, dword [esp + 0x68]
mov edi, dword [esp + 0x8c]
jmp 0x512fca
mov edx, ebx
mov ebx, eax
mov eax, ecx
mov ecx, ebx
jmp 0x512fa0
mov eax, 1
mov ecx, eax
call fcn.00471b30
nop
call fcn.004706b0
jmp fcn.00512d30