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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x506da0
sub esp, 0x38
mov eax, dword [esp + 0x48]
mov dword [esp], eax
mov ecx, dword [esp + 0x4c]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x50]
mov dword [esp + 8], edx
mov ebx, dword [esp + 0x6c]
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 0x70]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x74]
mov dword [esp + 0x14], ebx
call fcn.005066c0
mov ecx, dword [esp + 0x4c]
cmp ecx, 3
jbe 0x506d95
movzx ebx, byte [esp + 0x78]
test bl, bl
je 0x506b6f
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x3c]
mov esi, dword [esp + 0x44]
xor eax, eax
jmp 0x506ace
mov dword [esp + 0x2c], edi
lea edi, [esi + edi*4 - 0x1c]
xchg edi, ebx
neg ebx
xchg edi, ebx
shl eax, 2
sar edi, 0x1f
and edi, eax
mov dword [esp + 0x28], edi
mov eax, edi
mov edi, dword [ebx + 8]
xor edi, dword [ebx + 4]
xor edi, dword [ebx + 0xc]
mov dword [esp + 0x24], edi
lea edi, [edx + eax + 0xc]
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x34]
xor edi, dword [ecx]
mov dword [esp + 0x1c], edi
mov ecx, edi
and edi, 0xff
lea esi, [0x633a80]
mov edi, dword [esi + edi*4]
xor edi, dword [ebx]
shr ecx, 8
and ecx, 0xff
lea ebp, [0x633e80]
xor edi, dword [ebp + ecx*4]
mov ecx, edi
mov edi, dword [esp + 0x1c]
shr edi, 0x10
and edi, 0xff
lea ebp, [0x634280]
xor ecx, dword [ebp + edi*4]
mov edi, dword [esp + 0x1c]
shr edi, 0x18
and edi, 0xff
lea ebp, [0x634680]
xor ecx, dword [ebp + edi*4]
mov dword [esp + 0x24], ecx
mov dword [ebx], ecx
mov edi, dword [ebx + 8]
xor edi, ecx
mov dword [esp + 0x20], edi
mov edi, dword [ebx + 0xc]
mov ecx, dword [esp + 0x20]
xor edi, ecx
mov ecx, edi
mov edi, dword [edx + eax + 8]
xor edi, ecx
mov dword [esp + 0x1c], edi
mov ecx, edi
and edi, 0xff
mov edi, dword [esi + edi*4]
xor edi, dword [ebx + 4]
shr ecx, 8
and ecx, 0xff
lea esi, [0x633e80]
xor edi, dword [esi + ecx*4]
mov ecx, edi
mov edi, dword [esp + 0x1c]
shr edi, 0x10
and edi, 0xff
lea esi, [0x634280]
xor ecx, dword [esi + edi*4]
mov edi, dword [esp + 0x1c]
shr edi, 0x18
and edi, 0xff
xor ecx, dword [ebp + edi*4]
mov dword [esp + 0x20], ecx
mov dword [ebx + 4], ecx
mov edi, dword [esp + 0x24]
xor ecx, edi
mov edi, dword [ebx + 0xc]
xor edi, ecx
mov ecx, edi
mov edi, dword [edx + eax + 4]
xor edi, ecx
mov dword [esp + 0x1c], edi
mov ecx, edi
and edi, 0xff
lea eax, [0x633a80]
mov edi, dword [eax + edi*4]
xor edi, dword [ebx + 8]
shr ecx, 8
and ecx, 0xff
lea eax, [0x633e80]
xor edi, dword [eax + ecx*4]
mov ecx, edi
mov edi, dword [esp + 0x1c]
shr edi, 0x10
and edi, 0xff
xor ecx, dword [esi + edi*4]
mov edi, dword [esp + 0x1c]
shr edi, 0x18
and edi, 0xff
xor ecx, dword [ebp + edi*4]
mov dword [ebx + 8], ecx
mov edi, dword [esp + 0x20]
xor ecx, edi
mov edi, dword [esp + 0x24]
xor edi, ecx
mov ecx, edi
mov edi, dword [esp + 0x28]
mov edi, dword [edx + edi]
xor edi, ecx
mov dword [esp + 0x1c], edi
mov ecx, edi
and edi, 0xff
lea edx, [0x633a80]
mov edi, dword [edx + edi*4]
xor edi, dword [ebx + 0xc]
shr ecx, 8
and ecx, 0xff
xor edi, dword [eax + ecx*4]
mov ecx, edi
mov edi, dword [esp + 0x1c]
shr edi, 0x10
and edi, 0xff
xor ecx, dword [esi + edi*4]
mov edi, dword [esp + 0x1c]
shr edi, 0x18
and edi, 0xff
xor ecx, dword [ebp + edi*4]
mov dword [ebx + 0xc], ecx
mov edi, dword [esp + 0x2c]
inc edi
mov ecx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x4c]
mov ebp, dword [esp + 0x3c]
mov esi, dword [esp + 0x44]
mov eax, edi
cmp eax, 8
jge 0x506afd
mov edi, eax
shl eax, 2
mov edx, ebp
lea ebp, [eax - 0x20]
xchg ebp, ebx
neg ebx
xchg ebp, ebx
cmp ebp, esi
ja 0x506d8c
add eax, 0xffffffe4
neg eax
cmp eax, ebp
jbe 0x5068ea
jmp 0x506d85
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
mov ebp, dword [ebx + 4]
mov esi, dword [ebx]
mov dword [ebx], eax
mov dword [ebx + 4], edx
mov dword [ebx + 8], ebp
mov dword [ebx + 0xc], esi
mov eax, dword [esp + 0x54]
mov dword [esp], eax
mov edx, dword [esp + 0x58]
mov dword [esp + 4], edx
mov ebp, dword [esp + 0x5c]
mov dword [esp + 8], ebp
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x14], ecx
call fcn.00506790
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x58]
cmp eax, ecx
jle 0x506b6b
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x54]
cmp eax, edx
je 0x506b67
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
call fcn.0045a190
add esp, 0x38
ret
mov ecx, eax
jmp 0x506b4b
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x3c]
mov esi, dword [esp + 0x44]
xor eax, eax
jmp 0x506d56
mov dword [esp + 0x2c], edi
sub esi, eax
xchg esi, ebx
neg ebx
xchg esi, ebx
shl edi, 4
sar esi, 0x1f
and esi, edi
lea edi, [ebp + esi]
mov dword [esp + 0x30], edi
mov edi, dword [edx + 8]
xor edi, dword [edx + 4]
xor edi, dword [edx + 0xc]
mov ecx, dword [esp + 0x30]
xor edi, dword [ecx]
mov dword [esp + 0x18], edi
mov ecx, edi
and edi, 0xff
lea ebx, [0x633a80]
mov edi, dword [ebx + edi*4]
xor edi, dword [edx]
shr ecx, 8
and ecx, 0xff
lea eax, [0x633e80]
xor edi, dword [eax + ecx*4]
mov ecx, edi
mov edi, dword [esp + 0x18]
shr edi, 0x10
and edi, 0xff
lea eax, [0x634280]
xor ecx, dword [eax + edi*4]
mov edi, dword [esp + 0x18]
shr edi, 0x18
and edi, 0xff
lea eax, [0x634680]
xor ecx, dword [eax + edi*4]
mov dword [esp + 0x24], ecx
mov dword [edx], ecx
mov edi, dword [edx + 8]
xor edi, ecx
mov dword [esp + 0x20], edi
mov edi, dword [edx + 0xc]
mov ecx, dword [esp + 0x20]
xor edi, ecx
mov ecx, edi
mov edi, dword [ebp + esi + 4]
xor edi, ecx
mov dword [esp + 0x18], edi
mov ecx, edi
and edi, 0xff
mov edi, dword [ebx + edi*4]
xor edi, dword [edx + 4]
shr ecx, 8
and ecx, 0xff
lea ebx, [0x633e80]
xor edi, dword [ebx + ecx*4]
mov ecx, edi
mov edi, dword [esp + 0x18]
shr edi, 0x10
and edi, 0xff
lea ebx, [0x634280]
xor ecx, dword [ebx + edi*4]
mov edi, dword [esp + 0x18]
shr edi, 0x18
and edi, 0xff
xor ecx, dword [eax + edi*4]
mov dword [esp + 0x20], ecx
mov dword [edx + 4], ecx
mov edi, dword [esp + 0x24]
xor ecx, edi
mov edi, dword [edx + 0xc]
xor edi, ecx
mov ecx, edi
mov edi, dword [ebp + esi + 8]
xor edi, ecx
mov dword [esp + 0x18], edi
mov ecx, edi
and edi, 0xff
lea ebp, [0x633a80]
mov edi, dword [ebp + edi*4]
xor edi, dword [edx + 8]
shr ecx, 8
and ecx, 0xff
lea ebp, [0x633e80]
xor edi, dword [ebp + ecx*4]
mov ecx, edi
mov edi, dword [esp + 0x18]
shr edi, 0x10
and edi, 0xff
xor ecx, dword [ebx + edi*4]
mov edi, dword [esp + 0x18]
shr edi, 0x18
and edi, 0xff
xor ecx, dword [eax + edi*4]
mov dword [edx + 8], ecx
mov edi, dword [esp + 0x20]
xor ecx, edi
mov edi, dword [esp + 0x24]
xor edi, ecx
mov ecx, edi
mov edi, dword [esp + 0x3c]
mov edi, dword [edi + esi + 0xc]
xor edi, ecx
mov dword [esp + 0x18], edi
mov ecx, edi
and edi, 0xff
lea esi, [0x633a80]
mov edi, dword [esi + edi*4]
xor edi, dword [edx + 0xc]
shr ecx, 8
and ecx, 0xff
xor edi, dword [ebp + ecx*4]
mov ecx, edi
mov edi, dword [esp + 0x18]
shr edi, 0x10
and edi, 0xff
xor ecx, dword [ebx + edi*4]
mov edi, dword [esp + 0x18]
shr edi, 0x18
and edi, 0xff
xor ecx, dword [eax + edi*4]
mov dword [edx + 0xc], ecx
mov edi, dword [esp + 0x2c]
inc edi
mov ecx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x4c]
mov ebx, edx
mov ebp, dword [esp + 0x3c]
mov esi, dword [esp + 0x44]
mov eax, edi
cmp eax, 8
jge 0x506afd
mov edi, eax
shl eax, 2
mov edx, ebx
lea ebx, [eax + 4]
cmp ebx, esi
ja 0x506d7c
cmp eax, ebx
jbe 0x506b82
mov ecx, ebx
call fcn.00459930
mov ecx, ebx
mov edx, esi
call fcn.00459910
mov ecx, ebp
call fcn.00459930
mov ecx, ebp
mov edx, esi
call fcn.00459910
mov eax, 3
call fcn.004598d0
nop
call fcn.00458300
jmp fcn.00506870