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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
push 8
mov dword [ebp - 0x10], 0
mov edi, dword [esi + 8]
mov eax, dword [esi]
add edi, 0x28
push edi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x20], edi
mov dword [esi + 0x14], edi
call fcn.004da8a0
add esp, 8
cmp dword [esi + 0x5c], 7
jne 0x5069dd
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x1e], 1
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov al, byte [esi + 0x62]
mov ecx, dword [esi + 0x1c]
mov dword [ebp - 8], ecx
mov byte [ebp - 1], al
cmp al, 1
jne 0x506a74
mov eax, dword [esi + 8]
add eax, 0x168
mov dword [ebp - 0x1c], eax
test byte [eax + 0x1c], 0x10
je 0x506a10
mov edx, dword [eax + 0x18]
mov ebx, dword [eax + 4]
shr edx, 2
mov dword [ebp - 0x10], edx
jmp 0x506a12
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
cmp edx, 2
jb 0x506a56
lea eax, [edx - 1]
xor esi, esi
mov dword [ebp - 0x18], eax
xor edx, edx
mov edi, eax
mov eax, dword [ebx + ecx*4]
add esi, dword [eax + 4]
mov eax, dword [ebx + ecx*4 + 4]
add ecx, 2
add edx, dword [eax + 4]
cmp ecx, edi
jl 0x506a33
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x14], esi
mov esi, dword [ebp + 8]
cmp ecx, edx
jge 0x506a66
mov eax, dword [ebx + ecx*4]
mov ecx, dword [esi + 0x1c]
add ecx, dword [eax + 4]
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
add eax, dword [ebp - 0x18]
add ecx, eax
mov dword [ebp - 8], ecx
mov edx, dword [esi + 0x58]
lea eax, [edx + 1]
mov dword [esi + 0x58], eax
cmp edx, ecx
jge 0x506d0c
cmp byte [ebp - 1], 2
jne 0x506a9a
mov eax, dword [esi + 4]
lea ecx, [edx + edx*4]
cmp byte [eax + ecx*4], 0x8a
mov ecx, dword [ebp - 8]
jne 0x506a74
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0xe0], 0
je 0x506adf
mov eax, dword [str.interrupted]
mov ecx, str.unknown_error
test eax, eax
mov dword [esi + 0x5c], 9
mov edi, 1
cmovne ecx, eax
lea eax, [esi + 0x38]
push ecx
push 0x5fcb5c
push dword [ebp - 0xc]
push eax
call fcn.004f99a0
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x1c]
cmp edx, eax
jge 0x506aeb
mov eax, dword [esi + 4]
jmp 0x506b0a
sub edx, eax
xor ecx, ecx
mov eax, dword [ebx]
mov eax, dword [eax + 4]
cmp edx, eax
jl 0x506b05
inc ecx
sub edx, eax
mov eax, dword [ebx + ecx*4]
mov eax, dword [eax + 4]
cmp edx, eax
jge 0x506af8
mov eax, dword [ebx + ecx*4]
mov eax, dword [eax]
cmp byte [esi + 0x62], 1
lea ecx, [edx + edx*4]
lea ecx, [eax + ecx*4]
mov eax, 4
mov dword [ebp + 8], ecx
jne 0x506bda
mov word [edi + 0x1c], ax
mov eax, edx
cdq
mov dword [edi + 0x10], eax
mov eax, 0xa02
mov dword [edi + 0x14], edx
mov byte [edi + 0x1e], 1
mov word [edi + 0x44], ax
movzx eax, byte [ecx]
mov edx, dword [eax*4 + 0x5cfdb0]
mov eax, edx
mov dword [edi + 0x2c], edx
test edx, edx
je 0x506b61
cmp byte [edx], 0
je 0x506b5a
inc eax
cmp byte [eax], 0
jne 0x506b54
sub eax, edx
and eax, 0x3fffffff
mov dword [edi + 0x40], eax
mov word [edi + 0x46], 0x103
add edi, 0x50
cmp byte [ecx + 1], 0xee
mov edx, edi
mov dword [ebp - 0x14], edx
jne 0x506bda
mov ecx, dword [ebp - 0x10]
lea eax, [ecx*4]
mov dword [ebp - 0x18], eax
xor eax, eax
test ecx, ecx
je 0x506b9e
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x10]
cmp dword [ebx + eax*4], edx
je 0x506b9b
inc eax
cmp eax, ecx
jl 0x506b91
mov edx, dword [ebp - 0x14]
mov edi, edx
cmp eax, ecx
jne 0x506bda
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
add eax, 4
push 1
push eax
push ebx
call fcn.00507340
add esp, 0xc
test eax, eax
jne 0x506bda
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebx + 4]
mov edi, dword [ebp - 0x14]
mov eax, dword [eax + 0x10]
mov dword [edx + ecx], eax
lea eax, [edx + 4]
or word [ebx + 0x1c], 0x10
mov dword [ebx + 0x18], eax
mov ecx, dword [ebp + 8]
mov ebx, 4
mov word [edi + 0x1c], bx
push 0
push 0x20
mov eax, dword [ecx + 4]
mov byte [edi + 0x1e], 1
cdq
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], edx
mov word [edi + 0x44], bx
mov eax, dword [ecx + 8]
cdq
mov dword [edi + 0x38], eax
mov dword [edi + 0x3c], edx
mov byte [edi + 0x46], 1
mov word [edi + 0x6c], bx
mov eax, dword [ecx + 0xc]
cdq
mov dword [edi + 0x60], eax
mov dword [edi + 0x64], edx
mov byte [edi + 0x6e], 1
add edi, 0x78
push edi
call fcn.00507340
add esp, 0xc
test eax, eax
jne 0x5069d1
mov ebx, dword [ebp + 8]
mov eax, 0x602
push 0x20
push dword [edi + 4]
mov word [edi + 0x1c], ax
push ebx
call fcn.004cb770
mov ecx, dword [edi + 4]
add esp, 0xc
cmp eax, ecx
je 0x506c63
push 0
push 1
push 0xffffffffffffffff
push eax
push edi
call fcn.00507990
add esp, 0x14
jmp 0x506c84
mov eax, ecx
test ecx, ecx
je 0x506c7d
cmp byte [ecx], 0
je 0x506c76
nop
inc eax
cmp byte [eax], 0
jne 0x506c70
sub eax, ecx
and eax, 0x3fffffff
mov dword [edi + 0x18], eax
mov byte [edi + 0x1f], 1
mov byte [edi + 0x1e], 3
add edi, 0x28
mov al, byte [esi + 0x62]
cmp al, 1
jne 0x506ce4
push 0
push 4
push edi
call fcn.00507340
add esp, 0xc
test eax, eax
jne 0x5069d1
mov eax, 0x602
mov dword [edi + 0x18], 2
mov word [edi + 0x1c], ax
movzx eax, byte [ebx + 3]
push eax
push str._.2x
push dword [edi + 4]
push 3
call fcn.004b88e0
mov word [edi + 0x1e], 0x103
mov eax, 1
mov word [edi + 0x44], ax
add esp, 0x10
mov byte [edi + 0x46], 5
mov al, byte [esi + 0x62]
movzx eax, al
mov ecx, 3
sub cx, ax
mov dword [esi + 0x5c], 0
mov edi, 0x64
shl cx, 2
mov eax, edi
mov word [esi + 0x30], cx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 0x65
mov dword [esi + 0x5c], 0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret