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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, eax
push esi
mov esi, dword [ebx + 8]
xor eax, eax
push edi
mov edi, dword [ebx]
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], eax
add esi, 0x28
mov eax, 8
mov ecx, esi
mov dword [ebp - 0x14], edi
call fcn.004f4750
cmp dword [ebx + 0x58], 7
mov dword [ebx + 0x14], 0
jne 0x50599a
mov byte [edi + 0x36], 1
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebx + 0x5d], 1
mov edi, dword [ebx + 0x1c]
mov dword [ebp - 8], edi
jne 0x505a10
mov eax, dword [ebx + 8]
add eax, 0x168
test byte [eax + 0x1c], 0x10
mov dword [ebp - 0x10], eax
je 0x5059c6
mov ecx, dword [eax + 0x18]
mov eax, dword [eax + 4]
shr ecx, 2
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], eax
xor ecx, ecx
xor edx, edx
xor eax, eax
cmp dword [ebp - 4], 2
jl 0x5059f0
mov edi, dword [ebp - 0xc]
mov edi, dword [edi + eax*4]
add ecx, dword [edi + 4]
mov edi, dword [ebp - 0xc]
mov edi, dword [edi + eax*4 + 4]
add edx, dword [edi + 4]
mov edi, dword [ebp - 4]
add eax, 2
dec edi
cmp eax, edi
jl 0x5059d2
cmp eax, dword [ebp - 4]
jge 0x505a03
mov edi, dword [ebp - 0xc]
mov eax, dword [edi + eax*4]
mov edi, dword [ebp - 8]
add edi, dword [eax + 4]
jmp 0x505a06
mov edi, dword [ebp - 8]
add edx, ecx
add edi, edx
lea ebx, [ebx]
mov eax, dword [ebx + 0x54]
lea ecx, [eax + 1]
mov dword [ebx + 0x54], ecx
cmp eax, edi
jge 0x505a75
cmp byte [ebx + 0x5d], 2
jne 0x505a2f
mov ecx, dword [ebx + 4]
lea edx, [eax + eax*4]
cmp byte [ecx + edx*4], 0x96
jne 0x505a10
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0xe0]
test ecx, ecx
je 0x505a8a
mov dword [ebx + 0x58], 9
mov ecx, dword [str.interrupted]
mov edi, 1
mov eax, str.unknown_error
test ecx, ecx
je 0x505a59
mov eax, ecx
push eax
push 0x596a80
add ebx, 0x34
mov esi, edx
call fcn.005039c0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 0x65
mov eax, edi
pop edi
pop esi
mov dword [ebx + 0x58], 0
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 0x1c]
cmp eax, ecx
jge 0x505a9f
mov ecx, dword [ebx + 4]
lea edx, [eax + eax*4]
lea edi, [ecx + edx*4]
mov dword [ebp - 8], edi
jmp 0x505ace
mov edi, dword [ebp - 0xc]
sub eax, ecx
mov ecx, dword [edi]
mov ecx, dword [ecx + 4]
xor edx, edx
cmp eax, ecx
jl 0x505abe
nop
sub eax, ecx
mov ecx, dword [edi + edx*4 + 4]
mov ecx, dword [ecx + 4]
inc edx
cmp eax, ecx
jge 0x505ab0
mov edx, dword [edi + edx*4]
mov edx, dword [edx]
lea ecx, [eax + eax*4]
lea ecx, [edx + ecx*4]
mov dword [ebp - 8], ecx
mov edi, ecx
cmp byte [ebx + 0x5d], 1
jne 0x505b8e
mov edx, 4
mov word [esi + 0x1c], dx
cdq
mov dword [esi + 0x10], eax
mov byte [esi + 0x1e], 1
mov dword [esi + 0x14], edx
mov eax, 0xa02
mov word [esi + 0x44], ax
movzx ecx, byte [edi]
mov eax, dword [ecx*4 + 0x5936b8]
mov dword [esi + 0x2c], eax
mov ecx, eax
test eax, eax
je 0x505b1e
cmp byte [eax], 0
je 0x505b16
lea ecx, [ecx]
inc ecx
cmp byte [ecx], 0
jne 0x505b10
sub ecx, eax
and ecx, 0x3fffffff
mov dword [esi + 0x40], ecx
mov word [esi + 0x46], 0x103
add esi, 0x50
cmp byte [edi + 1], 0xee
jne 0x505b8e
mov eax, dword [ebp - 4]
lea edx, [eax*4 + 4]
xor ecx, ecx
mov dword [ebp - 0x14], edx
test eax, eax
jle 0x505b57
mov eax, dword [edi + 0x10]
mov edx, dword [ebp - 0xc]
cmp dword [edx + ecx*4], eax
je 0x505b54
inc ecx
cmp ecx, dword [ebp - 4]
jl 0x505b46
mov eax, dword [ebp - 4]
cmp ecx, eax
jne 0x505b8e
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp - 0x10]
push 1
call fcn.004f3bc0
add esp, 4
test eax, eax
jne 0x505b8b
mov edx, dword [ebp - 8]
mov edx, dword [edx + 0x10]
mov eax, edi
mov ecx, dword [eax + 4]
mov edi, dword [ebp - 4]
mov dword [ecx + edi*4], edx
mov ecx, dword [ebp - 0x14]
or word [eax + 0x1c], 0x10
mov dword [eax + 0x18], ecx
mov edi, dword [ebp - 8]
mov edx, 4
mov word [esi + 0x1c], dx
mov eax, dword [edi + 4]
cdq
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
mov byte [esi + 0x1e], 1
mov eax, 4
mov word [esi + 0x44], ax
mov eax, dword [edi + 8]
cdq
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], edx
mov byte [esi + 0x46], 1
mov ecx, 4
mov word [esi + 0x6c], cx
mov eax, dword [edi + 0xc]
cdq
mov dword [esi + 0x60], eax
push 0
lea eax, [ecx + 0x1c]
lea edi, [esi + 0x78]
mov dword [esi + 0x64], edx
mov byte [esi + 0x6e], 1
call fcn.004f3bc0
add esp, 4
test eax, eax
jne 0x50598e
mov edi, dword [esi + 0x7c]
mov eax, dword [ebp - 8]
mov edx, 0x602
push 0x20
mov word [esi + 0x94], dx
call fcn.004fccd0
mov ecx, dword [esi + 0x7c]
add esp, 4
cmp eax, ecx
je 0x505c23
push 1
push eax
xor eax, eax
or ecx, 0xffffffff
lea edx, [esi + 0x78]
call fcn.00505680
add esp, 8
jmp 0x505c4a
mov eax, ecx
test ecx, ecx
je 0x505c3d
cmp byte [ecx], 0
je 0x505c36
mov edi, edi
inc eax
cmp byte [eax], 0
jne 0x505c30
sub eax, ecx
and eax, 0x3fffffff
mov dword [esi + 0x90], eax
mov byte [esi + 0x97], 1
mov byte [esi + 0x96], 3
cmp byte [ebx + 0x5d], 1
jne 0x505cc4
push 0
mov eax, 4
lea edi, [esi + 0xa0]
call fcn.004f3bc0
add esp, 4
test eax, eax
jne 0x50598e
mov ecx, dword [ebp - 8]
mov eax, 0x602
mov word [esi + 0xbc], ax
mov eax, dword [esi + 0xa4]
mov dword [esi + 0xb8], 2
movzx edx, byte [ecx + 3]
push edx
push str._.2x
push eax
push 3
call fcn.004fa9a0
mov word [esi + 0xbe], 0x103
mov ecx, 1
add esp, 0x10
mov word [esi + 0xe4], cx
mov byte [esi + 0xe6], 5
movzx edx, byte [ebx + 0x5d]
mov ecx, dword [ebx + 8]
dec dx
mov eax, 2
sub ax, dx
add ax, ax
add ax, ax
mov edi, 0x64
mov word [ebx + 0x2c], ax
mov eax, edi
pop edi
add ecx, 0x28
pop esi
mov dword [ebx + 0x14], ecx
mov dword [ebx + 0x58], 0
pop ebx
mov esp, ebp
pop ebp
ret