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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc
mov esi, ecx
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov edx, ecx
sub edx, eax
je 0x5086ca
movsx edi, byte [eax]
cmp edi, 0x4a
je 0x5086f9
cmp edi, 0x4c
je 0x5086d8
cmp edi, 0x58
jne 0x5086ca
inc eax
mov ecx, esi
mov dword [esi], eax
call fcn.0050aa10
mov ecx, eax
xor eax, eax
test ecx, ecx
je 0x50885f
mov edx, dword [esi]
cmp edx, dword [esi + 4]
je 0x50885f
cmp byte [edx], 0x45
jne 0x50885f
inc edx
mov eax, ecx
mov dword [esi], edx
jmp 0x50885f
mov ecx, esi
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
jmp fcn.00505b50
cmp edx, 2
jb 0x5087c4
cmp byte [eax + 1], 0x5a
jne 0x5087c4
add eax, 2
mov ecx, esi
mov dword [esi], eax
call fcn.00504da0
jmp 0x5086a0
inc eax
lea edi, [esi + 0x14]
mov dword [esi], eax
mov edx, dword [esi + 0xc]
sub edx, dword [esi + 8]
sar edx, 2
mov dword [esp], edx
mov dword [esp + 8], edi
cmp eax, ecx
jne 0x508732
jmp 0x50873b
lea eax, [ebp + 4]
mov dword [esi + 0xc], eax
mov dword [ebp], edi
mov eax, dword [esi]
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x50873b
cmp byte [eax], 0x45
je 0x5087d9
mov ecx, esi
call fcn.00508670
test eax, eax
je 0x5087d2
mov ebp, dword [esi + 0xc]
mov edi, eax
cmp ebp, dword [esi + 0x10]
jne 0x508720
mov ecx, dword [esi + 8]
sub ebp, ecx
cmp dword [esp + 8], ecx
lea eax, [ebp + ebp]
je 0x508780
push eax
push ecx
call sub.msvcrt.dll_realloc
add esp, 8
mov ebx, eax
test eax, eax
mov dword [esi + 8], eax
jne 0x5087ac
jmp 0x508867
mov dword [esp + 4], ecx
push eax
call sub.msvcrt.dll_malloc
add esp, 4
test eax, eax
je 0x508867
mov ebx, eax
test ebp, ebp
je 0x5087a9
push ebp
push dword [esp + 8]
push ebx
call sub.msvcrt.dll_memmove
add esp, 0xc
mov dword [esi + 8], ebx
mov eax, ebp
sar ebp, 1
sar eax, 2
lea ecx, [ebx + ebp*4]
lea ebp, [ebx + eax*4]
mov dword [esi + 0xc], ebp
mov dword [esi + 0x10], ecx
jmp 0x508720
mov ecx, esi
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
jmp fcn.0050db60
xor eax, eax
jmp 0x50885f
inc eax
mov ebp, dword [esp]
mov ecx, esi
mov dword [esi], eax
mov edx, dword [esi + 8]
shl ebp, 2
add edx, ebp
push dword [esi + 0xc]
call fcn.00510d40
add esp, 4
add ebp, dword [esi + 8]
mov edi, eax
mov ebx, edx
mov dword [esi + 0xc], ebp
mov ebp, dword [esi + 0x116c]
mov ecx, dword [ebp + 4]
lea eax, [ecx + 0x10]
cmp eax, 0xff8
jb 0x508835
push 0x1000
call sub.msvcrt.dll_malloc
add esp, 4
test eax, eax
je 0x508867
mov dword [eax], ebp
xor ecx, ecx
mov ebp, eax
mov dword [eax + 4], 0
mov dword [esi + 0x116c], eax
add ecx, 0x10
mov dword [ebp + 4], ecx
mov ecx, dword [esi + 0x116c]
mov edx, dword [ecx + 4]
mov dword [ecx + edx - 4], 0x101011c
mov dword [ecx + edx - 8], 0x5ba748
lea eax, [ecx + edx - 8]
mov dword [ecx + edx + 4], ebx
mov dword [ecx + edx], edi
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.004dfe30
nop dword [eax]
push ebp
push ebx
push edi
push esi
mov ebx, dword [ecx]
mov edx, dword [ecx + 4]
mov al, 1
cmp ebx, edx
je 0x508a1b
cmp byte [ebx], 0x68
jne 0x5088f2
lea edi, [ebx + 1]
mov esi, edx
cmp edi, edx
mov ebp, edi
mov dword [ecx], edi
je 0x5088a7
cmp byte [edi], 0x6e
mov esi, edi
mov ebp, edi
jne 0x5088a7
add ebx, 2
mov esi, ebx
mov ebp, ebx
mov dword [ecx], ebx
xor ebx, ebx
cmp ebp, edx
je 0x508952
movsx ebp, byte [esi]
xor ebx, ebx
add ebp, 0xffffffd0
cmp ebp, 9
ja 0x508952
inc esi
nop word cs:[eax + eax]
nop dword [eax]
cmp edx, esi
mov dword [ecx], esi
je 0x5089e0
movsx ebx, byte [esi]
inc esi
add ebx, 0xffffffd0
cmp ebx, 0xa
jb 0x5088d0
dec esi
mov ebx, esi
cmp edi, ebx
jne 0x50895c
jmp 0x508a1b
cmp byte [ebx], 0x76
jne 0x508a1b
lea edi, [ebx + 1]
mov esi, edx
cmp edi, edx
mov ebp, edi
mov dword [ecx], edi
je 0x50891a
cmp byte [edi], 0x6e
mov esi, edi
mov ebp, edi
jne 0x50891a
add ebx, 2
mov esi, ebx
mov ebp, ebx
mov dword [ecx], ebx
xor ebx, ebx
cmp ebp, edx
je 0x508977
movsx ebp, byte [esi]
xor ebx, ebx
add ebp, 0xffffffd0
cmp ebp, 9
ja 0x508977
inc esi
nop
cmp edx, esi
mov dword [ecx], esi
je 0x508a05
movsx ebx, byte [esi]
inc esi
add ebx, 0xffffffd0
cmp ebx, 0xa
jb 0x508930
dec esi
mov ebx, esi
cmp edi, ebx
jne 0x508981
jmp 0x508a1b
xor edi, edi
cmp edi, ebx
je 0x508a1b
cmp esi, edx
je 0x508a1b
cmp byte [esi], 0x5f
jne 0x508a1b
inc esi
mov dword [ecx], esi
xor eax, eax
jmp 0x508a1b
xor edi, edi
cmp edi, ebx
je 0x508a1b
cmp esi, edx
je 0x508a1b
cmp byte [esi], 0x5f
jne 0x508a1b
lea ebx, [esi + 1]
mov edi, edx
cmp ebx, edx
mov ebp, ebx
mov dword [ecx], ebx
je 0x5089b1
cmp byte [ebx], 0x6e
mov edi, ebx
mov ebp, ebx
jne 0x5089b1
add esi, 2
mov edi, esi
mov ebp, esi
mov dword [ecx], esi
xor esi, esi
cmp ebp, edx
je 0x5089ee
movsx ebp, byte [edi]
xor esi, esi
add ebp, 0xffffffd0
cmp ebp, 9
ja 0x5089ee
inc edi
cmp edx, edi
mov dword [ecx], edi
je 0x508a13
movsx esi, byte [edi]
inc edi
add esi, 0xffffffd0
cmp esi, 0xa
jb 0x5089c5
dec edi
mov esi, edi
cmp ebx, esi
jne 0x5089f4
jmp 0x508a1b
mov esi, edx
mov ebx, edx
cmp edi, ebx
jne 0x50895c
jmp 0x508a1b
xor ebx, ebx
cmp ebx, esi
je 0x508a1b
cmp edi, edx
je 0x508a1b
cmp byte [edi], 0x5f
jne 0x508a1b
inc edi
mov dword [ecx], edi
jmp 0x508970
mov esi, edx
mov ebx, edx
cmp edi, ebx
jne 0x508981
jmp 0x508a1b
mov edi, edx
mov esi, edx
cmp ebx, esi
jne 0x5089f4
pop esi
pop edi
pop ebx
pop ebp
ret