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

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x10]
xor edx, edx
test eax, eax
mov dword [0x59a5e0], 0
push ebx
cmovns edx, eax
mov ebx, ecx
mov eax, dword [esp + 0x18]
push ebp
xor ebp, ebp
test eax, eax
push esi
cmovns ebp, eax
mov eax, dword [ebx + 0x5c]
cmp edx, eax
mov ecx, eax
push edi
cmovle ecx, edx
cmp ebp, eax
cmovg ebp, eax
mov dword [esp + 0x10], ebp
cmp ebp, ecx
jge 0x4a69aa
mov esi, ebp
mov ebp, ecx
mov dword [esp + 0x10], ebp
jmp 0x4a69b0
mov esi, ecx
je 0x4a69d7
nop
test esi, esi
jle 0x4a69d7
mov eax, dword [ebx + 0x5c]
sub eax, esi
test eax, eax
jle 0x4a69d7
mov eax, dword [ebx + 0x54]
movzx eax, byte [eax + esi]
push eax
call fcn.004d4600
add esp, 4
cmp eax, 1
jge 0x4a69d7
dec esi
cmp esi, ebp
jne 0x4a69b0
mov eax, dword [ebx + 0x54]
movzx eax, byte [eax + ebp]
push eax
call fcn.004d4600
mov ecx, dword [ebx + 0x5c]
add esp, 4
cmp ebp, ecx
jge 0x4a6a18
mov edx, ecx
mov ecx, edx
test ebp, ebp
jle 0x4a6a14
test eax, eax
jns 0x4a6a14
mov eax, dword [ebx + 0x54]
inc ebp
movzx eax, byte [eax + ebp]
push eax
call fcn.004d4600
mov ecx, dword [ebx + 0x5c]
add esp, 4
mov edx, ecx
cmp ebp, ecx
jl 0x4a69f0
mov dword [esp + 0x10], ebp
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x20], edx
test eax, eax
je 0x4a6a3e
test edx, edx
jne 0x4a6a3e
mov edx, eax
lea edi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4a6a31
sub edx, edi
mov dword [esp + 0x20], edx
cmp ebp, esi
jg 0x4a6a52
test edx, edx
jne 0x4a6a52
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret 0x10
mov edi, dword [ebx + 0x54]
xor edx, edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x2c], 1
lea eax, [edi + ecx]
cmp edi, eax
jae 0x4a6aac
mov edx, edi
nop dword [eax]
lea eax, [edx + esi]
cmp edi, eax
jne 0x4a6a81
lea edi, [edx + ebp]
lea eax, [ecx + edx]
cmp edi, eax
jae 0x4a6aa8
movzx eax, byte [edi]
push eax
call fcn.004d4600
mov ecx, dword [ebx + 0x5c]
add esp, 4
mov edx, dword [ebx + 0x54]
cmp eax, 1
cmovl eax, dword [esp + 0x2c]
inc dword [esp + 0x24]
add edi, eax
lea eax, [edx + ecx]
cmp edi, eax
jb 0x4a6a70
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
xor edi, edi
mov ecx, dword [esp + 0x28]
add eax, ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], eax
cmp ecx, eax
jae 0x4a6afb
mov ebp, ecx
cmp edx, dword [ebx + 0x7c]
jge 0x4a6af3
movzx eax, byte [ebp]
push eax
call fcn.004d4600
mov edx, dword [esp + 0x28]
add esp, 4
cmp eax, 1
cmovl eax, dword [esp + 0x2c]
inc edx
add ebp, eax
mov dword [esp + 0x24], edx
add edi, eax
cmp ebp, dword [esp + 0x20]
jb 0x4a6ac6
mov ebp, dword [esp + 0x10]
mov dword [esp + 0x14], edi
mov eax, dword [ebx + 0x5c]
mov ecx, ebx
add eax, edi
push eax
call fcn.004a6870
cmp ebp, esi
jle 0x4a6d08
mov edx, dword [ebx + 0x98]
lea ecx, [ebx + 0x98]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], edx
mov eax, dword [edx + 8]
cmp esi, eax
jne 0x4a6b82
mov eax, dword [edx + 0xc]
sub eax, esi
add eax, ebp
cmp eax, dword [edx + 4]
jle 0x4a6b55
sub eax, 0xffffff80
push eax
push dword [edx]
mov dword [edx + 4], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov ecx, dword [esp + 0x28]
add esp, 8
mov dword [ecx], eax
lea ecx, [ebx + 0x98]
mov ecx, dword [ecx]
mov eax, ebp
sub eax, esi
push eax
mov eax, dword [ebx + 0x54]
add eax, esi
push eax
mov eax, dword [ecx + 0xc]
add eax, dword [ecx]
push eax
call fcn.00517140
mov ecx, dword [ebx + 0x98]
mov eax, ebp
sub eax, esi
add esp, 0xc
add dword [ecx + 0xc], eax
jmp 0x4a6cc1
cmp ebp, eax
jne 0x4a6c1b
mov eax, dword [edx + 0x10]
mov dword [esp + 0x24], eax
test eax, eax
jne 0x4a6bf1
mov eax, dword [edx + 0xc]
mov ecx, edx
sub eax, esi
add eax, ebp
push eax
call fcn.004a6f30
mov eax, dword [ebx + 0x98]
push dword [eax + 0xc]
mov ecx, dword [eax]
push ecx
sub ecx, esi
add ecx, ebp
push ecx
call fcn.00517140
mov eax, ebp
sub eax, esi
push eax
mov eax, dword [ebx + 0x54]
add eax, esi
push eax
mov eax, dword [ebx + 0x98]
push dword [eax]
call fcn.00517140
mov ecx, dword [ebx + 0x98]
lea edx, [ebx + 0x98]
mov eax, ebp
mov dword [esp + 0x3c], edx
sub eax, esi
add esp, 0x18
add dword [ecx + 0xc], eax
jmp 0x4a6cc1
mov eax, ebp
sub eax, esi
cmp eax, dword [esp + 0x24]
jge 0x4a6c0f
mov eax, dword [esp + 0x24]
sub eax, ebp
mov dword [esp + 0x24], ecx
add eax, esi
mov dword [edx + 0x10], eax
jmp 0x4a6cc1
lea eax, [ebx + 0x98]
mov dword [esp + 0x24], eax
jmp 0x4a6c1f
mov dword [esp + 0x24], ecx
mov ecx, dword [ebx + 0xa0]
call fcn.004a6020
push dword [ebx + 0x98]
mov ecx, dword [ebx + 0x9c]
call fcn.004a6830
push 0x18
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
test eax, eax
je 0x4a6c74
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
jmp 0x4a6c76
xor eax, eax
mov edi, ebp
mov dword [ebx + 0x98], eax
sub edi, esi
mov ecx, eax
push edi
call fcn.004a6f30
mov eax, dword [ebx + 0x54]
add eax, esi
push edi
push eax
mov eax, dword [ebx + 0x98]
push dword [eax]
call fcn.00517140
mov eax, dword [ebx + 0x98]
add esp, 0xc
mov dword [eax + 0xc], edi
mov eax, dword [ebx + 0x98]
mov edi, dword [esp + 0x14]
mov dword [eax + 0x10], 0
mov eax, dword [esp + 0x24]
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x5c]
mov ecx, dword [ebx + 0x58]
sub eax, ebp
inc eax
push eax
lea eax, [ecx + ebp]
push eax
lea eax, [ecx + esi]
push eax
call fcn.00517140
mov eax, dword [ebx + 0x5c]
add esp, 0xc
mov ecx, dword [esp + 0x24]
sub eax, ebp
add eax, esi
mov dword [ebx + 0x5c], eax
mov eax, dword [ecx]
mov dword [eax + 8], esi
mov al, byte [ebx + 0x4c]
mov ecx, dword [ecx]
and al, 7
cmp al, 5
jne 0x4a6d02
mov dword [ecx + 0x14], 0
jmp 0x4a6d08
mov eax, dword [ecx + 0xc]
mov dword [ecx + 0x14], eax
test edi, edi
je 0x4a6de8
mov eax, dword [ebx + 0x98]
cmp esi, dword [eax + 8]
jne 0x4a6d23
add dword [eax + 0x10], edi
jmp 0x4a6db9
mov ecx, dword [ebx + 0xa0]
call fcn.004a6020
mov ebp, dword [ebx + 0x9c]
mov eax, dword [ebx + 0x98]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 8]
cmp dword [ebp + 4], eax
jne 0x4a6d5f
add eax, 0x19
mov dword [ebp + 8], eax
shl eax, 2
push eax
push dword [ebp]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
mov dword [ebp], eax
mov ecx, dword [ebp + 4]
mov eax, dword [ebp]
mov edx, dword [esp + 0x24]
push 0x18
mov dword [eax + ecx*4], edx
inc dword [ebp + 4]
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
test eax, eax
je 0x4a6da1
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
jmp 0x4a6da3
xor eax, eax
mov dword [ebx + 0x98], eax
mov dword [eax + 0xc], 0
mov eax, dword [ebx + 0x98]
mov dword [eax + 0x10], edi
mov eax, dword [ebx + 0x5c]
mov ecx, dword [ebx + 0x58]
sub eax, esi
add ecx, esi
inc eax
push eax
push ecx
lea eax, [ecx + edi]
push eax
call fcn.00517140
mov eax, dword [ebx + 0x58]
mov ebp, dword [esp + 0x34]
add eax, esi
push edi
push ebp
push eax
call fcn.00517140
add esp, 0x18
add dword [ebx + 0x5c], edi
jmp 0x4a6dec
mov ebp, dword [esp + 0x28]
mov eax, dword [ebx + 0x68]
lea ecx, [edi + esi]
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x64]
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 0x98]
mov dword [eax + 8], ecx
test byte [ebx + 0x4c], 0x10
mov dword [ebx + 0x64], ecx
mov dword [ebx + 0x68], ecx
je 0x4a6ec2
xor eax, eax
test edi, edi
jle 0x4a6e2b
nop dword [eax]
cmp byte [eax + ebp], 0x20
je 0x4a6e2b
inc eax
cmp eax, edi
jl 0x4a6e20
test esi, esi
jle 0x4a6ec2
cmp eax, edi
jne 0x4a6e96
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isspace]
nop dword [eax]
mov ecx, dword [ebx + 0x54]
lea eax, [esp + 0x28]
push eax
mov eax, dword [ebx + 0x5c]
add eax, ecx
mov dword [esp + 0x2c], 0
push eax
lea eax, [ecx + esi]
push eax
call fcn.004d43f0
movzx eax, al
push eax
call edi
add esp, 0x10
test eax, eax
jne 0x4a6ec2
mov ecx, dword [ebx + 0x54]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [ebx + 0x5c]
add eax, ecx
push eax
lea eax, [ecx + esi]
push eax
call fcn.004d43f0
add esp, 0xc
cmp eax, 0xa
je 0x4a6ec2
dec esi
test esi, esi
jg 0x4a6e40
jmp 0x4a6ec2
mov ecx, dword [ebx + 0x54]
lea eax, [esp + 0x28]
push eax
mov eax, dword [ebx + 0x5c]
add eax, ecx
mov dword [esp + 0x2c], 0
push eax
lea eax, [ecx + esi]
push eax
call fcn.004d43f0
add esp, 0xc
cmp eax, 0xa
je 0x4a6ec2
dec esi
test esi, esi
jg 0x4a6e96
cmp dword [esp + 0x24], esi
mov al, byte [ebx + 0x4d]
cmovl esi, dword [esp + 0x24]
cmp dword [esp + 0x20], esi
cmovl esi, dword [esp + 0x20]
test al, al
js 0x4a6ef7
test al, 2
je 0x4a6ee4
cmp esi, dword [ebx + 0x78]
jge 0x4a6ee7
mov dword [ebx + 0x78], esi
push 2
mov ecx, ebx
call fcn.00496ea0
mov byte [ebx + 0x84], 0
mov eax, dword [ebx + 0x98]
mov eax, dword [eax + 8]
or dword [ebx + 0x40], 0x80
test byte [ebx + 0x4f], 1
mov dword [ebx + 0x64], eax
mov dword [ebx + 0x68], eax
je 0x4a6f20
push 8
push dword [ebx + 0xc]
mov ecx, ebx
push ebx
call fcn.00499760
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x10