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

Disassembly:
mov ecx, dword [0x5efcb0]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
lea eax, [esp - 0xc]
cmp eax, dword [ecx + 8]
jbe 0x500b2f
sub esp, 0x8c
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
lea eax, [esp + 0x6c]
mov dword [esp + 0x74], eax
test byte [eax], al
lea ecx, [0x500b40]
mov dword [eax], ecx
test byte [eax], al
mov ecx, dword [0x5efdd0]
mov edx, dword [esp + 0x5c]
test ecx, ecx
je 0x50087d
jmp 0x50087f
jmp 0x50088e
call fcn.004757c0
mov dword [edi], edx
mov ecx, dword [eax + 4]
mov dword [edi + 4], ecx
jmp 0x50088e
mov dword [eax + 4], edx
mov dword [esp + 0x30], eax
lea eax, [esp + 0x24]
mov dword [esp], eax
call fcn.0043aff0
test eax, eax
jne 0x5008df
jmp 0x5008a7
mov eax, dword [esp + 0x94]
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x98]
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], edx
mov dword [esp + 0x40], 0
mov dword [esp + 0x3c], eax
jmp 0x5008eb
call fcn.0043b2e0
add esp, 0x8c
ret
mov eax, dword [esp + 0x40]
cmp dword [esp + 0x3c], eax
jg 0x5008fa
jmp 0x500b23
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x80]
lea eax, [ecx + eax*8]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], eax
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.00487f90
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ecx
test ecx, ecx
je 0x500937
jmp 0x50093c
jmp 0x500b1a
mov dword [esp + 0x48], ecx
cmp ecx, 0x46
setge al
mov byte [esp + 0x22], al
jge 0x50094e
jmp 0x500962
mov eax, dword [esp + 0x50]
mov dword [esp + 0x44], eax
cmp eax, 0x48
setle al
mov byte [esp + 0x22], al
jmp 0x500964
jmp 0x500964
movzx eax, byte [esp + 0x22]
test al, al
jne 0x500972
jmp 0x500b16
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], ecx
mov eax, dword [esp + 0x9c]
mov dword [esp], eax
lea eax, [0x5115e0]
mov dword [esp + 4], eax
lea eax, [esp + 0x64]
mov dword [esp + 8], eax
call fcn.0047cbd0
mov eax, dword [esp + 0xc]
movzx ecx, byte [esp + 0x14]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], edx
mov byte [esp + 0x22], cl
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], eax
movzx eax, byte [esp + 0x22]
mov byte [esp + 0x23], al
mov byte [esp + 0x21], al
test al, al
jne 0x5009ef
jmp 0x5009f4
jmp 0x500b14
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0046bbc0
mov eax, dword [esp + 8]
mov dword [esp + 0x60], eax
mov ecx, dword [esp + 0x9c]
mov dword [esp], ecx
lea ecx, [0x5115e0]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
lea eax, [0x511ee0]
mov dword [esp + 0xc], eax
lea eax, [0x5efb80]
mov dword [esp + 0x10], eax
call fcn.0047cf50
mov eax, dword [esp + 0xa4]
mov dword [esp], eax
call fcn.0047e530
mov eax, dword [esp + 0xa0]
test byte [eax], al
mov ecx, dword [eax + 8]
mov edx, dword [eax]
mov eax, dword [eax + 4]
inc eax
cmp ecx, eax
jae 0x500a68
jmp 0x500a6a
jmp 0x500a9a
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], 1
lea eax, [0x5115e0]
mov dword [esp + 0x10], eax
call fcn.00471230
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
jmp 0x500a9a
lea ebx, [edx + eax*8 - 8]
mov ebp, dword [esp + 0x4c]
lea esi, [edx + eax*8 - 4]
mov edi, dword [esp + 0x50]
mov dword [esi], edi
mov esi, dword [0x5efdd0]
test esi, esi
je 0x500ab8
jmp 0x500aba
jmp 0x500ac8
call fcn.004757c0
mov dword [edi], ebp
mov esi, dword [ebx]
mov dword [edi + 4], esi
jmp 0x500ac8
mov dword [ebx], ebp
mov ebx, dword [esp + 0xa0]
test byte [ebx], al
mov dword [ebx + 4], eax
mov dword [ebx + 8], ecx
mov eax, dword [0x5efdd0]
test eax, eax
je 0x500ae5
jmp 0x500ae7
jmp 0x500af5
call fcn.004757c0
mov dword [edi], edx
mov eax, dword [ebx]
mov dword [edi + 4], eax
jmp 0x500af5
mov dword [ebx], edx
mov eax, dword [esp + 0xa4]
mov dword [esp], eax
call fcn.0047e980
mov eax, dword [esp + 0xac]
test byte [eax], al
mov byte [eax], 1
jmp 0x500b14
jmp 0x500b18
jmp 0x500b18
jmp 0x500b1a
inc dword [esp + 0x40]
jmp 0x5008eb
call fcn.0043b2e0
add esp, 0x8c
ret
call fcn.004743b0
jmp fcn.00500820