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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp + 8]
push eax
call fcn.0050bc30
add esp, 4
test eax, eax
jne 0x51e498
movzx ecx, byte [0x5e8b44]
test ecx, ecx
jne 0x51e4a1
mov dword [ebp - 0xc], 0
jmp 0x51e4b3
mov edx, 4
imul eax, edx, 0xb
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax + 0x78]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x30]
movzx edx, word [ecx + 6]
lea eax, [edx*4 + 0x14]
mov dword [ebp - 0x24], eax
imul ecx, dword [ebp - 0xc], 0x48
add ecx, 0x88
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x24]
cdq
push edx
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.004e83f0
add esp, 0xc
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
mov dword [eax + 0x2c], ecx
cmp dword [ebp - 4], 0
jne 0x51e507
mov dword [ebp - 0x1c], 7
jmp 0x51e780
mov edx, 0x10
imul eax, edx, 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + eax + 4]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0x20]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov dword [edx + 0x1c], eax
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x30]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.00571df0
add esp, 0xc
mov edx, dword [ebp - 8]
mov dword [edx + 0xc], 0
cmp dword [ebp + 0xc], 0
je 0x51e566
cmp dword [ebp - 0xc], 0
jne 0x51e566
mov eax, dword [ebp - 8]
mov cx, word [ebp + 0xc]
mov word [eax + 6], cx
mov edx, dword [ebp - 0x18]
push edx
call fcn.004e0f70
add esp, 4
mov eax, dword [ebp - 0x18]
push eax
call fcn.004e11a0
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
mov dword [ecx + 0xc], edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.004e2380
add esp, 4
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov edx, dword [ebp - 4]
mov byte [edx + 0x3b], cl
mov eax, dword [ebp - 0xc]
sub eax, 1
mov ecx, dword [ebp - 4]
mov byte [ecx + 0x3a], al
mov edx, dword [ebp - 4]
movzx eax, byte [edx + 0x3b]
cmp eax, 1
jle 0x51e5c3
mov dword [ebp - 0x28], 1
jmp 0x51e5ca
mov dword [ebp - 0x28], 0
mov ecx, dword [ebp - 4]
mov dl, byte [ebp - 0x28]
mov byte [ecx + 0x39], dl
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dword [eax + 0x18], ecx
mov dword [ebp - 0x14], 0
jmp 0x51e5ee
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 4]
movzx ecx, byte [eax + 0x3b]
cmp dword [ebp - 0x14], ecx
jge 0x51e613
imul edx, dword [ebp - 0x14], 0x48
mov eax, dword [ebp - 4]
lea ecx, [eax + edx + 0x40]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 4]
mov dword [edx + 8], eax
jmp 0x51e5e5
mov ecx, dword [ebp + 8]
push ecx
call fcn.0050bc30
add esp, 4
test eax, eax
jne 0x51e72d
mov edx, dword [0x5e8c0c]
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x34]
imul eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov edx, 0x10
imul eax, edx, 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + eax + 0xc]
mov eax, dword [eax + 0x50]
cdq
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], edx
cmp dword [ebp - 0x38], 0
jg 0x51e682
jl 0x51e666
cmp dword [ebp - 0x3c], 0
jae 0x51e682
push 0xffffffffffffffff
push 0xfffffc00
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00571080
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], edx
jmp 0x51e69b
mov eax, dword [ebp - 0x10]
cdq
push edx
push eax
mov eax, dword [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.00571080
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], edx
cmp dword [ebp - 0x38], 0
jg 0x51e6ba
jl 0x51e6ac
cmp dword [ebp - 0x3c], 0x20000000
jae 0x51e6ba
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x40], eax
jmp 0x51e6c6
xor ecx, ecx
mov dword [ebp - 0x44], 0x20000000
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 4]
cmp dword [edx], ecx
jle 0x51e6e6
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov dword [ebp - 0x2c], ecx
jmp 0x51e6ec
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 4], ecx
movzx edx, byte [0x5e8b48]
test edx, edx
jne 0x51e72d
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
mov dword [eax + 0x34], ecx
mov eax, dword [ebp - 0x10]
cdq
push edx
push eax
call fcn.004fa8d0
add esp, 8
mov edx, dword [ebp - 4]
mov dword [edx + 0x28], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0x28], 0
jne 0x51e72d
mov dword [ebp - 0x1c], 7
mov ecx, dword [ebp - 8]
movzx edx, word [ecx + 8]
cmp edx, 0xd
jge 0x51e780
mov eax, 4
imul ecx, eax, 0
mov edx, dword [ebp - 8]
cmp dword [edx + ecx + 0x14], 0
je 0x51e762
mov eax, 4
imul ecx, eax, 0
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + ecx + 0x14]
cmp ecx, dword [eax + 8]
jne 0x51e780
mov edx, 1
imul eax, edx, 0
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x10]
movzx eax, byte [edx + eax]
and eax, 2
jne 0x51e780
mov ecx, dword [ebp - 4]
mov byte [ecx + 0x3c], 3
mov eax, dword [ebp - 0x1c]
mov esp, ebp
pop ebp
ret