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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x68e549
push eax
mov dword fs:[0], esp
sub esp, 0x58
push ebp
mov ebp, ecx
push esi
xor esi, esi
cmp dword [ebp + 0x174], esi
jle 0x505d45
mov eax, dword [ebp + 0x1a4]
push ebx
push edi
mov edi, dword [esp + 0x78]
cmp edi, esi
mov dword [esp + 0x10], eax
jge 0x5059e2
xor edi, edi
jmp 0x5059e8
cmp edi, eax
jle 0x5059e8
mov edi, eax
mov al, byte [esp + 0x78]
lea ecx, [esp + 0x3c]
mov byte [esp + 0x38], al
call fcn.0046da30
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], esi
mov eax, dword [ebp + 0x174]
xor ebx, ebx
cmp eax, esi
mov dword [esp + 0x70], esi
jle 0x505b3e
jmp 0x505a2d
xor esi, esi
cmp dword [esp + 0x10], edi
jle 0x505b3e
lea ecx, [ebp + 0x17c]
push edi
mov edx, dword [ecx]
mov dword [esp + 0x2c], edx
mov eax, dword [ecx + 4]
mov dword [esp + 0x30], eax
mov edx, dword [ecx + 8]
mov dword [esp + 0x34], edx
mov eax, dword [ecx + 0xc]
lea ecx, [esp + 0x2c]
mov dword [esp + 0x38], eax
call fcn.004ff710
mov eax, dword [esp + 0x30]
push 0
mov esi, eax
mov cl, byte [eax]
mov byte [esp + 0x1c], cl
lea ecx, [esp + 0x1c]
call fcn.004031c0
mov edx, dword [0x6a3564]
lea ecx, [esp + 0x18]
push edx
push 0
push esi
call fcn.00402fc0
mov eax, dword [esp + 0x64]
mov byte [esp + 0x70], 1
test eax, eax
je 0x505aef
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
cmp ecx, edx
je 0x505aef
lea eax, [ecx + 0x10]
cmp eax, edx
jne 0x505ac9
mov dword [esp + 0x54], eax
lea eax, [esp + 0x18]
push eax
push ecx
call fcn.004dbfb0
add esp, 8
lea ecx, [esp + 0x38]
call fcn.004632a0
jmp 0x505b13
mov dword [esp + 0x78], ecx
mov dword [esp + 0x54], eax
mov dword [esp + 0x14], ecx
test ecx, ecx
mov byte [esp + 0x70], 2
je 0x505ae8
lea edx, [esp + 0x18]
push edx
call fcn.0041cf60
mov byte [esp + 0x70], 1
jmp 0x505b13
lea ecx, [esp + 0x38]
call fcn.004632a0
mov eax, dword [esp + 0x54]
mov ecx, eax
add eax, 0x10
mov dword [esp + 0x54], eax
lea eax, [esp + 0x18]
push eax
push ecx
call fcn.004dbfb0
add esp, 8
mov eax, dword [esp + 0x64]
push 1
inc eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x68], eax
mov byte [esp + 0x74], 0
call fcn.004031c0
mov eax, dword [ebp + 0x174]
inc ebx
inc edi
cmp ebx, eax
jl 0x505a2b
xor esi, esi
mov edi, ebx
xor ebx, ebx
test edi, edi
jle 0x505ba1
mov ebx, edi
mov ecx, dword [ebp + 0x160]
mov eax, dword [ecx + esi*4]
test eax, eax
je 0x505b9c
mov dword [eax + 0xcc], 0xffffffff
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x30], ecx
push esi
lea ecx, [esp + 0x2c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], edx
call fcn.004ff710
mov eax, dword [ebp + 0x160]
mov ecx, dword [eax + esi*4]
mov eax, dword [esp + 0x30]
push eax
mov edx, dword [ecx]
call dword [edx + 0x78]
inc esi
cmp esi, edi
jl 0x505b48
mov eax, dword [ebp + 0x174]
mov esi, ebx
cmp ebx, eax
mov dword [esp + 0x78], esi
jge 0x505c5b
mov ecx, dword [ebp + 0x160]
cmp dword [ecx + esi*4], 0
je 0x505c48
mov dl, byte [esp + 0x78]
push 0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1c], dl
call fcn.004031c0
mov edi, 0x6dfe28
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x1c]
push ebx
call fcn.00403350
test al, al
je 0x505c20
mov edi, dword [esp + 0x1c]
mov ecx, ebx
mov eax, ecx
mov esi, 0x6dfe28
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
call fcn.00403330
mov esi, dword [esp + 0x78]
mov ecx, dword [ebp + 0x160]
lea eax, [esp + 0x18]
push eax
mov byte [esp + 0x74], 3
mov ecx, dword [ecx + esi*4]
mov edx, dword [ecx]
call dword [edx + 0x78]
push 1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x74], 0
call fcn.004031c0
mov eax, dword [ebp + 0x174]
inc esi
cmp esi, eax
mov dword [esp + 0x78], esi
jl 0x505bb5
mov eax, dword [esp + 0x64]
pop edi
test eax, eax
mov dword [esp + 0x6c], 0xffffffff
pop ebx
je 0x505d45
mov eax, dword [esp + 0x3c]
push 0
mov ecx, eax
add eax, 0x10
mov dword [esp + 0x40], eax
call fcn.004ff7b0
mov eax, dword [esp + 0x5c]
dec eax
mov dword [esp + 0x5c], eax
je 0x505ca0
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
cmp ecx, eax
jne 0x505d39
mov eax, dword [esp + 0x40]
mov ecx, eax
add eax, 4
mov dword [esp + 0x40], eax
mov edx, dword [ecx]
push edx
call fcn.006713a0
mov eax, dword [esp + 0x60]
add esp, 4
test eax, eax
jne 0x505d08
lea ecx, [esp + 0x20]
call fcn.0046da30
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x34], eax
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x38], ecx
push eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], esi
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], esi
call fcn.006713a0
add esp, 4
jmp 0x505d39
mov eax, dword [esp + 0x40]
push eax
mov ecx, dword [eax]
push ecx
lea ecx, [esp + 0x18]
call fcn.00463c10
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edx
mov eax, dword [esp + 0x5c]
test eax, eax
jne 0x505c71
mov ecx, dword [esp + 0x60]
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x64
ret 4