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

Disassembly:
sub esp, 0x7c
mov eax, dword [0x68e500]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push ebp
push esi
push edi
mov edx, dword [esp + 0xa4]
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x98]
mov ebx, dword [esp + 0x9c]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x24], eax
mov eax, dword [edx]
mov ebp, dword [esp + 0xa0]
mov dword [esp + 0x1c], eax
movzx eax, word [ebx + 0xc]
movzx esi, ax
mov dword [esp + 0x54], ebx
mov ebx, esi
mov dword [esp + 0x48], edx
movzx edx, ax
mov dword [esp + 0x2c], eax
mov eax, dword [ebp]
shl ebx, 4
add ebx, 0xc
mov dword [esp + 0x38], eax
mov edi, dword [esp + 0xac]
xor eax, eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], 0
mov dword [esp + 0x50], edx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
mov byte [esp + 0x17], 0
mov dword [esp + 0x4c], 0xc
test esi, esi
je 0x5058f5
nop dword [eax]
nop word [eax + eax]
mov edx, dword [ecx + eax*4]
cmp dword [edx + 4], 0x676c7966
je 0x505a32
inc eax
cmp eax, esi
jl 0x5058e0
xor eax, eax
mov dword [ebp + 0xc], 0
xor edx, edx
test esi, esi
je 0x505920
mov esi, dword [ecx + eax*4]
cmp dword [esi + 4], 0x6c6f6361
je 0x505922
mov edi, dword [esp + 0x2c]
inc eax
movzx esi, di
mov edi, dword [esp + 0x18]
cmp eax, esi
jl 0x505904
xor esi, esi
xor ecx, ecx
mov dword [ebp + 0x10], esi
test esi, esi
sete cl
xor eax, eax
test edx, edx
sete al
cmp eax, ecx
jne 0x505d44
test edx, edx
je 0x505950
mov eax, dword [esi + 0x10]
xor eax, dword [edx + 0x10]
test eax, 0x100
jne 0x505d44
lea eax, [esp + 0x20]
push eax
push 0x28
push edi
call fcn.004ba480
add esp, 0xc
mov edi, eax
cmp dword [esp + 0x20], 0
jne 0x505cc7
push dword [esp + 0x94]
push dword [esp + 0x34]
push edi
call fcn.004b8410
xor ecx, ecx
add esp, 0xc
mov dword [esp + 0x3c], ecx
cmp word [esp + 0x2c], cx
je 0x505cb1
mov eax, dword [esp + 0x34]
mov eax, dword [eax + ecx*4]
movups xmm0, xmmword [eax]
movups xmmword [esp + 0x58], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [esp + 0x68], xmm0
psrldq xmm0, 4
movd esi, xmm0
push esi
push edi
call fcn.004b8ae0
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
jne 0x505cb8
mov edx, dword [esp + 0x70]
lea eax, [edx + esi]
cmp eax, dword [esp + 0x94]
ja 0x505cb8
mov ecx, dword [esp + 0x5c]
cmp ecx, 0x68686561
jne 0x505a3c
push 0x22
push edi
mov dword [esp + 0x18], 0
call fcn.004b8b20
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x505cb8
lea eax, [esp + 0x10]
push eax
push edi
call fcn.004b89a0
add esp, 8
movzx eax, ax
cmp dword [esp + 0x10], 0
jne 0x505cb8
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x70]
mov dword [esp + 0x40], eax
jmp 0x505a40
mov dword [ebp + 0xc], edx
xor eax, eax
jmp 0x505904
mov eax, dword [esp + 0x40]
test dword [esp + 0x68], 0x100
mov word [ebp + 6], ax
mov dword [esp + 0x10], 0
jne 0x505ab6
cmp ecx, 0x68656164
jne 0x505a74
cmp edx, 0xc
jb 0x505cb8
mov eax, dword [esp + 0x30]
add eax, esi
mov dword [eax + 8], 0
add esi, dword [esp + 0x30]
push edx
push esi
call fcn.00503470
push dword [esp + 0x20]
mov ecx, eax
lea eax, [esp + 0x34]
push dword [esp + 0x7c]
mov dword [esp + 0x20], ecx
push esi
mov esi, dword [esp + 0x38]
push eax
lea eax, [esp + 0x34]
push esi
push eax
call fcn.0050b2a0
add esp, 0x20
test eax, eax
jne 0x505cb8
mov edx, dword [esp + 0x10]
jmp 0x505b75
cmp ecx, 0x676c7966
jne 0x505aec
push dword [esp + 0x18]
mov esi, dword [esp + 0x28]
lea eax, [esp + 0x2c]
push ebp
push eax
push esi
lea eax, [esp + 0x2c]
mov byte [esp + 0x27], 1
push eax
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x28]
push eax
push edi
call fcn.00505d60
add esp, 0x20
jmp 0x505b65
cmp ecx, 0x6c6f6361
jne 0x505b06
mov edx, dword [esp + 0x44]
mov ebx, dword [esp + 0x74]
mov esi, dword [esp + 0x24]
mov dword [esp + 0x10], edx
jmp 0x505b79
cmp ecx, 0x686d7478
jne 0x505cb8
cmp byte [esp + 0x17], 0
jne 0x505b37
push dword [esp + 0x18]
push ebp
push dword [esp + 0x34]
push dword [esp + 0x40]
push edi
call fcn.00503d40
add esp, 0x14
test eax, eax
jne 0x505cb8
push dword [esp + 0x18]
mov esi, dword [esp + 0x28]
lea eax, [esp + 0x2c]
push eax
push esi
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x20]
push eax
push dword [ebp + 8]
movzx eax, word [ebp + 6]
push eax
movzx eax, word [ebp + 4]
push eax
push edi
call fcn.00506a50
add esp, 0x24
test eax, eax
jne 0x505cb8
mov edx, dword [esp + 0x10]
mov dword [esp + 0x10], edx
mov ecx, dword [esp + 0x5c]
mov eax, ecx
mov byte [esp + 0x7b], cl
shr eax, 0x18
mov byte [esp + 0x78], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x79], al
mov eax, ecx
shr eax, 8
mov byte [esp + 0x7a], al
mov eax, edx
shr eax, 0x18
mov byte [esp + 0x7c], al
mov eax, edx
shr eax, 0x10
mov byte [esp + 0x7d], al
mov eax, edx
mov ecx, dword [esp + 0x60]
shr eax, 8
mov byte [esp + 0x7e], al
mov eax, ebx
shr eax, 0x18
mov byte [esp + 0x80], al
mov eax, ebx
push dword [esp + 0x18]
shr eax, 0x10
mov byte [esp + 0x85], al
mov eax, ebx
shr eax, 8
mov byte [esp + 0x86], al
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0x88], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x89], al
mov eax, ecx
shr eax, 8
mov byte [esp + 0x8a], al
lea eax, [esp + 0x7c]
push 0x10
push eax
lea eax, [esp + 0x58]
mov byte [esp + 0x8b], dl
push eax
lea eax, [esp + 0x2c]
mov byte [esp + 0x93], bl
push esi
push eax
mov byte [esp + 0x9f], cl
call fcn.0050b2a0
lea eax, [esp + 0x90]
push 0x10
push eax
call fcn.00503470
add eax, dword [esp + 0x30]
add dword [esp + 0x58], eax
lea eax, [esp + 0x48]
push dword [esp + 0x38]
push eax
push dword [esp + 0x4c]
lea eax, [esp + 0x48]
push eax
call fcn.00504620
add esp, 0x30
test eax, eax
jne 0x505cb8
mov eax, dword [esp + 0x60]
add eax, ebx
mov ebx, dword [esp + 0x28]
cmp eax, ebx
ja 0x505cb8
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x2c]
inc ecx
movzx eax, dx
mov dword [esp + 0x3c], ecx
cmp ecx, eax
jl 0x505992
mov ecx, dword [esp + 0x50]
xor eax, eax
mov edx, dword [esp + 0x34]
movzx esi, cx
nop word [eax + eax]
mov ecx, dword [edx + eax*4]
cmp dword [ecx + 4], 0x68656164
je 0x505cfb
inc eax
cmp eax, esi
jl 0x505ca0
mov dword [ebp + 0x14], 0
cmp dword [esp + 0x20], 0
jne 0x505cc7
mov dword [esp + 0x20], 8
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x1c]
mov dword [ecx], eax
push edi
call fcn.004b8020
push edi
push dword [esp + 0x20]
call fcn.004ba4e0
mov eax, dword [esp + 0x2c]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.005aa453
add esp, 0x7c
ret
mov dword [ebp + 0x14], ecx
test ecx, ecx
je 0x505cb8
cmp dword [ecx + 8], 0xc
jb 0x505cb8
mov edx, dword [ecx + 0x1c]
mov ecx, 0xb1b0afba
sub ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x1c]
mov eax, ecx
add edx, esi
shr eax, 0x18
mov byte [edx + 8], al
mov eax, ecx
shr eax, 0x10
mov byte [edx + 9], al
mov eax, ecx
shr eax, 8
mov byte [edx + 0xa], al
mov eax, dword [esp + 0x54]
mov byte [edx + 0xb], cl
mov ecx, dword [esp + 0x48]
mov dword [eax + 0x3c], ebx
mov dword [ecx], esi
jmp 0x505cd1
mov ecx, dword [esp + 0x88]
mov eax, 8
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005aa453
add esp, 0x7c
ret