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

Disassembly:
sub esp, 0x50
push ebx
push ebp
push esi
mov esi, dword [esp + 0x60]
mov eax, dword [esi]
mov ebp, dword [eax]
mov eax, dword [eax + 4]
mov edx, dword [esi + 4]
push edi
mov edi, dword [esi + 0xc]
movzx ecx, byte [edi + 0x10]
lea ecx, [ecx + ecx*8]
lea eax, [eax + ecx*8 + 8]
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esi + 8]
push ecx
mov ecx, dword [esp + 0x78]
push eax
mov eax, dword [esp + 0x80]
push eax
push ecx
push edx
push ebp
mov dword [esp + 0x58], ebp
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], edi
call fcn.005180f0
mov ebx, eax
add esp, 0x1c
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x51a430
xor eax, eax
xor edx, edx
mov word [edi + 0x12], dx
mov dword [edi + 0x24], 0x400
mov word [edi + 0x28], ax
mov byte [edi + 0x1c], al
mov ecx, dword [ebp]
mov eax, dword [ebx]
push ecx
mov dword [esp + 0x34], eax
call fcn.005185c0
add esp, 4
test eax, eax
je 0x51a43d
mov ecx, dword [ebp]
mov eax, ebx
call fcn.004ab580
mov eax, 7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x6c]
lea edx, [esp + 0x14]
push edx
push eax
push ebx
mov ebx, dword [esp + 0x74]
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebp
push ebx
push esi
call fcn.00519fa0
xor edx, edx
add esp, 0x24
mov dword [esp + 0x18], eax
cmp eax, edx
jne 0x51a669
mov eax, ebx
not eax
mov ecx, ebp
not ecx
mov dword [esp + 0x40], eax
and eax, dword [edi]
mov dword [esp + 0x44], ecx
and ecx, dword [edi + 4]
mov dword [esp + 0x58], eax
or eax, ecx
mov dword [esp + 0x5c], ecx
je 0x51a669
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], edx
cmp dword [esp + 0x14], edx
je 0x51a504
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push ecx
push edx
push eax
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebp
push ebx
push esi
call fcn.00519fa0
mov ecx, dword [esp + 0x64]
and ecx, dword [edi]
mov edx, dword [esp + 0x68]
and edx, dword [edi + 4]
add esp, 0x24
mov dword [esp + 0x50], ecx
or ecx, edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x54], edx
jne 0x51a4fc
mov ecx, 1
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], ecx
test eax, eax
jne 0x51a669
mov eax, dword [esp + 0x30]
or edx, 0xffffffff
or esi, 0xffffffff
test eax, eax
jle 0x51a571
mov ecx, dword [esp + 0x34]
mov edi, dword [ecx + 0x14]
mov ecx, dword [esp + 0x1c]
mov ebx, dword [ecx + 4]
add ebx, 8
mov dword [esp + 0x2c], eax
mov eax, dword [ebx]
lea eax, [eax + eax*2]
shl eax, 4
mov ecx, dword [eax + edi + 0x20]
mov eax, dword [eax + edi + 0x24]
and eax, dword [esp + 0x44]
and ecx, dword [esp + 0x40]
cmp eax, dword [esp + 0x4c]
jb 0x51a55b
ja 0x51a54d
cmp ecx, dword [esp + 0x48]
jbe 0x51a55b
cmp eax, esi
ja 0x51a55b
jb 0x51a557
cmp ecx, edx
jae 0x51a55b
mov edx, ecx
mov esi, eax
add ebx, 0xc
sub dword [esp + 0x2c], 1
jne 0x51a527
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x6c]
mov eax, edx
and eax, esi
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], esi
cmp eax, 0xffffffff
je 0x51a5f5
cmp edx, dword [esp + 0x58]
jne 0x51a58e
cmp esi, dword [esp + 0x5c]
je 0x51a5e8
cmp edx, dword [esp + 0x50]
jne 0x51a59a
cmp esi, dword [esp + 0x54]
je 0x51a5e8
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x20]
push eax
push ecx
push 0
or edx, ebx
or esi, ebp
push esi
push edx
mov edx, dword [esp + 0x7c]
push ebp
push ebx
push edx
call fcn.00519fa0
mov dword [esp + 0x3c], eax
mov eax, dword [edi]
add esp, 0x24
cmp eax, ebx
jne 0x51a5e8
mov ecx, dword [edi + 4]
cmp ecx, ebp
jne 0x51a5e8
cmp dword [esp + 0x14], 0
mov dword [esp + 0x28], 1
jne 0x51a5e8
mov dword [esp + 0x24], 1
cmp dword [esp + 0x18], 0
je 0x51a504
jmp 0x51a669
cmp dword [esp + 0x18], 0
jne 0x51a669
cmp dword [esp + 0x28], 0
jne 0x51a63c
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x68]
push eax
push ecx
push 0
push ebp
push ebx
push ebp
push ebx
push edx
call fcn.00519fa0
add esp, 0x24
cmp dword [esp + 0x14], 0
mov dword [esp + 0x18], eax
jne 0x51a638
mov dword [esp + 0x24], 1
test eax, eax
jne 0x51a669
cmp dword [esp + 0x24], 0
jne 0x51a669
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x68]
push ecx
push edx
push 1
push ebp
push ebx
push ebp
push ebx
push eax
call fcn.00519fa0
add esp, 0x24
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x1c]
cmp dword [esi + 0x1c], 0
je 0x51a67f
mov ecx, dword [esi + 0x18]
push ecx
call fcn.004ab490
add esp, 4
mov edx, dword [esp + 0x3c]
mov ecx, dword [edx]
test ecx, ecx
je 0x51a6cf
cmp dword [ecx + 0x1d8], 0
je 0x51a6a5
mov eax, esi
call fcn.004ab500
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
cmp esi, dword [ecx + 0x128]
jb 0x51a6cf
cmp esi, dword [ecx + 0x12c]
jae 0x51a6cf
mov eax, dword [ecx + 0x124]
mov dword [esi], eax
mov eax, dword [esp + 0x18]
mov dword [ecx + 0x124], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
push esi
call fcn.004ab490
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret