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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2a4
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, eax
mov eax, dword [ebp + 0x18]
push edi
xor edi, edi
mov dword [ebx + 8], edi
mov dword [ebx], eax
cmp esi, 3
jle 0x4656e7
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 0xc]
cmp dword [eax + 8], 4
jne 0x4656e7
mov edx, dword [eax]
mov dword [esp + 0x44], edx
jmp 0x4656eb
mov dword [esp + 0x44], edi
mov dword [esp + 0x2c], edi
cmp esi, 2
jle 0x46570c
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
lea ecx, [esp + 0xb0]
call fcn.0046f030
mov dword [esp + 0x3c], eax
jmp 0x465714
mov dword [esp + 0x3c], 0x4bd2c4
mov dword [esp + 0x34], edi
mov dword [ebx + 4], edi
cmp esi, 4
jle 0x46573b
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx + 0x10]
cmp dword [ecx + 8], 3
je 0x46573b
push edi
call fcn.0046eee0
add esp, 4
mov dword [esp + 0x24], eax
jmp 0x465743
mov dword [esp + 0x24], 0xffffffff
mov edx, dword [ebp + 0x18]
mov edi, dword [esp + 0x18]
xor esi, esi
mov dword [esp + 0x14], edx
cmp dword [esp + 0x24], 0
je 0x465789
mov eax, dword [ebp + 0x28]
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x20]
push eax
mov eax, dword [ebp + 0x1c]
push ecx
mov ecx, dword [ebp + 0x18]
push esi
push edx
mov edx, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push ecx
push edx
push eax
call fcn.004b7c30
add esp, 0x20
mov dword [esp + 0x4c], eax
cmp eax, 0xffffffff
jne 0x4658cc
mov eax, dword [ebp + 0x1c]
test esi, esi
je 0x465c96
cmp dword [ebp + 0x20], eax
jge 0x465c96
cmp dword [esp + 0x24], 0
je 0x465c96
mov ecx, dword [esp + 0x14]
movzx eax, word [ecx]
mov ecx, eax
mov dword [esp + 0x30], ecx
add ecx, 0x2800
mov edx, 0x3ff
xor esi, esi
cmp cx, dx
ja 0x465820
mov ecx, dword [esp + 0x14]
movzx ecx, word [ecx + 2]
mov edx, 0xdc00
cmp cx, dx
jb 0x465820
mov edx, 0xdfff
cmp cx, dx
ja 0x465820
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0xc]
movzx edx, word [esp + 0x30]
mov word [ecx + eax*2], dx
inc dword [ebx + 4]
mov edx, dword [esp + 0x14]
movzx edx, word [edx + 2]
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0xc]
mov word [ecx + eax*2], dx
inc dword [ebx + 4]
add dword [ebp + 0x20], 2
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x20]
lea eax, [ecx + edx*2]
mov dword [esp + 0x14], eax
jmp 0x465750
mov edx, dword [ebx + 0xc]
mov ecx, dword [ebx + 4]
mov word [edx + ecx*2], ax
mov eax, 1
add dword [ebx + 4], eax
add dword [ebp + 0x20], eax
mov eax, dword [esp + 0x14]
cmp word [eax], 0xd
mov edx, dword [ebx + 4]
jne 0x465c84
cmp word [eax + 2], 0xa
jne 0x465c84
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x465c84
mov eax, dword [ecx]
cmp eax, 0x50435245
je 0x4658b4
sub eax, 0x45524350
neg eax
sbb eax, eax
and eax, 0x19
add eax, 0xffffffe3
test eax, eax
jne 0x465c84
mov eax, dword [esp + 0x48]
test eax, 0x400000
je 0x465c84
mov eax, dword [ebx + 0xc]
mov ecx, 0xa
mov word [eax + edx*2], cx
mov ecx, dword [ebp + 0x18]
mov eax, 1
add dword [ebx + 4], eax
add dword [ebp + 0x20], eax
mov edx, dword [ebp + 0x20]
lea eax, [ecx + edx*2]
mov dword [esp + 0x14], eax
jmp 0x465750
test byte [ecx + 0xc], 2
je 0x465c84
mov eax, dword [ecx + 8]
and eax, 0x27fc7a7f
mov dword [esp + 0x48], eax
jmp 0x465880
test eax, eax
js 0x465d16
mov eax, 1
add dword [esp + 0x2c], eax
sub dword [esp + 0x24], eax
mov eax, dword [ebp + 0x24]
mov edx, dword [eax + 4]
mov eax, dword [eax]
add eax, eax
sub eax, dword [esp + 0x14]
mov dword [esp + 0x30], edx
add eax, dword [ebp + 0x18]
mov dword [esp + 0x20], 0
sar eax, 1
mov dword [esp + 0x40], eax
cmp dword [esp + 0x20], 0
je 0x465997
mov eax, dword [esp + 0x1c]
lea ecx, [eax + 3]
cmp ecx, dword [esp + 0x34]
jle 0x465962
mov edx, dword [esp + 0x30]
push edx
lea ecx, [eax + 2]
push ecx
mov ecx, dword [ebp + 0x1c]
push ecx
mov ecx, dword [esp + 0x30]
sub eax, edx
push ecx
mov ecx, dword [esp + 0x3c]
cdq
idiv ecx
push ecx
mov edi, eax
call fcn.0049f1f0
lea edx, [eax + eax]
add esp, 0x14
mov dword [esp + 0x34], eax
mov eax, dword [ebx + 0xc]
push edx
push eax
call dword [sym.imp.MSVCR100.dll_realloc]
add esp, 8
test eax, eax
je 0x465d5c
mov dword [ebx + 0xc], eax
mov esi, dword [esp + 0x40]
test esi, esi
je 0x465988
mov edx, dword [esp + 0x14]
mov eax, dword [ebx + 4]
lea ecx, [esi + esi]
push ecx
mov ecx, dword [ebx + 0xc]
push edx
lea edx, [ecx + eax*2]
push edx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
add dword [ebx + 4], esi
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0xc]
lea edi, [ecx + eax*2]
mov dword [esp + 0x18], edi
jmp 0x4659a2
mov eax, dword [ebx + 4]
add eax, dword [esp + 0x40]
mov dword [esp + 0x1c], eax
mov esi, dword [esp + 0x3c]
movzx eax, word [esi]
xor ecx, ecx
mov edx, esi
cmp dword [esp + 0x20], ecx
je 0x4659de
cmp ax, cx
je 0x4659d3
cmp ax, 0x24
je 0x4659cf
add esi, 2
mov word [edi], ax
movzx eax, word [esi]
add edi, 2
cmp ax, cx
jne 0x4659b8
mov dword [esp + 0x18], edi
mov eax, esi
sub eax, edx
sar eax, 1
add dword [ebx + 4], eax
jmp 0x4659ff
cmp ax, cx
je 0x4659f5
cmp ax, 0x24
je 0x4659f5
movzx eax, word [esi + 2]
add esi, 2
cmp ax, cx
jne 0x4659e3
mov eax, esi
sub eax, edx
sar eax, 1
add dword [esp + 0x1c], eax
cmp word [esi], cx
je 0x465c53
movzx eax, word [esi + 2]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x28], ecx
cmp ax, cx
je 0x465a67
mov dword [esp + 0x10], eax
test eax, 0xffffff80
jne 0x465a41
mov ecx, eax
push 2
push ecx
call dword [sym.imp.MSVCR100.dll__isctype]
add esp, 8
test eax, eax
mov eax, dword [esp + 0x10]
je 0x465a41
and eax, 0xffdf
jmp 0x465a44
movzx eax, ax
movzx ecx, ax
cmp ecx, 0x4c
je 0x465a54
add ecx, 0xffffffac
cmp ecx, 1
ja 0x465a67
movzx edx, ax
movzx eax, word [esi + 4]
mov dword [esp + 0x38], edx
mov dword [esp + 0x28], 1
movzx ecx, ax
mov dword [esp + 0x10], connect
test ecx, ecx
je 0x465aa3
cmp ecx, 0x24
je 0x465b6c
cmp ecx, 0x7b
je 0x465acd
add eax, 0xffffffd0
cmp ax, 9
ja 0x465aa3
lea eax, [ecx - 0x30]
mov ecx, dword [esp + 0x28]
lea esi, [esi + ecx*2 + 2]
cmp eax, 0x80000000
jne 0x465b80
cmp dword [esp + 0x20], 0
mov edi, dword [esp + 0x18]
mov ebx, dword [ebp + 8]
je 0x465b74
mov ax, word [esi]
mov word [edi], ax
inc dword [ebx + 4]
add edi, 2
mov dword [esp + 0x18], edi
add esi, 2
jmp 0x4659a6
mov edx, dword [esp + 0x28]
lea ebx, [esi + edx*2 + 4]
push 0x7d
push ebx
call dword [sym.imp.MSVCR100.dll_wcschr]
add esp, 8
mov dword [esp + 0x28], eax
test eax, eax
je 0x465aa3
mov edi, eax
sub edi, ebx
sar edi, 1
je 0x465aa3
cmp edi, 0x21
jae 0x465b58
push edi
lea eax, [esp + 0x6c]
push ebx
push eax
call dword [sym.imp.MSVCR100.dll_wcsncpy]
add esp, 0xc
xor ecx, ecx
push ecx
push 1
push ecx
push 1
lea eax, [esp + 0x78]
mov word [esp + edi*2 + 0x78], cx
call fcn.0049e420
add esp, 0x10
test eax, eax
je 0x465b45
lea edx, [esp + 0x68]
push edx
call dword [sym.imp.MSVCR100.dll__wtoi]
mov esi, dword [esp + 0x2c]
mov ebx, dword [ebp + 8]
mov edi, dword [esp + 0x1c]
add esp, 4
mov dword [esp + 0x10], eax
jmp 0x465a98
mov edi, dword [ebp + 0x24]
mov edx, dword [ebp + 0x10]
lea eax, [esp + 0x68]
call fcn.004b8ca0
mov dword [esp + 0x10], eax
mov esi, dword [esp + 0x28]
mov ebx, dword [ebp + 8]
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
jmp 0x465a98
add esi, 2
jmp 0x465aa3
inc dword [esp + 0x1c]
add esi, 2
jmp 0x4659a6
test eax, eax
js 0x465c4b
cmp eax, dword [esp + 0x4c]
jge 0x465c4b
mov edx, dword [ebp + 0x24]
mov ecx, dword [edx + eax*8]
mov eax, dword [edx + eax*8 + 4]
sub eax, ecx
mov dword [esp + 0x10], eax
je 0x465c4b
cmp dword [esp + 0x20], 0
je 0x465c43
mov edx, dword [ebp + 0x18]
add eax, eax
push eax
lea eax, [edx + ecx*2]
push eax
push edi
call sub.MSVCR100.dll_memcpy
add esp, 0xc
cmp word [esp + 0x38], 0
je 0x465c2d
mov eax, dword [esp + 0x10]
add eax, eax
xor ecx, ecx
mov word [eax + edi], cx
movzx eax, word [esp + 0x38]
sub eax, 0x4c
je 0x465c26
sub eax, 8
je 0x465c09
dec eax
jne 0x465c2d
push edi
call dword [sym.imp.USER32.dll_CharUpperW]
mov ecx, dword [esp + 0x10]
add dword [ebx + 4], ecx
lea edi, [edi + ecx*2]
mov dword [esp + 0x18], edi
add esi, 2
jmp 0x4659a6
mov eax, edi
call fcn.004266d0
mov ecx, dword [esp + 0x10]
add dword [ebx + 4], ecx
lea edi, [edi + ecx*2]
mov dword [esp + 0x18], edi
add esi, 2
jmp 0x4659a6
push edi
call dword [sym.imp.USER32.dll_CharLowerW]
mov ecx, dword [esp + 0x10]
add dword [ebx + 4], ecx
lea edi, [edi + ecx*2]
mov dword [esp + 0x18], edi
add esi, 2
jmp 0x4659a6
mov edx, dword [esp + 0x10]
add dword [esp + 0x1c], edx
add esi, 2
jmp 0x4659a6
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp eax, 2
jl 0x465904
mov eax, dword [ebp + 0x24]
mov esi, dword [eax]
sub esi, dword [eax + 4]
mov eax, dword [esp + 0x30]
neg esi
sbb esi, esi
and esi, 0xfffffbf0
add esi, 0x410
mov dword [ebp + 0x20], eax
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x20]
lea eax, [ecx + edx*2]
mov dword [esp + 0x14], eax
jmp 0x465750
cmp dword [esp + 0x2c], 0
je 0x465cfb
sub eax, dword [ebp + 0x20]
mov edi, eax
je 0x465cea
mov esi, dword [ebx + 4]
add esi, edi
cmp esi, dword [esp + 0x34]
jl 0x465ccc
mov edx, dword [ebx + 0xc]
lea ecx, [esi + esi + 2]
push ecx
push edx
call dword [sym.imp.MSVCR100.dll_realloc]
add esp, 8
test eax, eax
je 0x465d5c
mov dword [ebx + 0xc], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ebx + 4]
lea eax, [edi + edi]
push eax
mov eax, dword [ebx + 0xc]
push ecx
lea ecx, [eax + edx*2]
push ecx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
mov dword [ebx + 4], esi
mov edx, dword [ebx + 4]
mov eax, dword [ebx + 0xc]
xor ecx, ecx
mov word [eax + edx*2], cx
mov edx, dword [ebx + 0xc]
mov dword [ebx], edx
mov eax, dword [0x4e86f0]
push 1
push 0
push 0xffffffffffffffff
push 0x4bbb9c
push eax
call fcn.004a2810
jmp 0x465dbd
mov ecx, dword [0x4e4b24]
test byte [ecx + 0x100], 1
je 0x465d4e
push 0xa
lea edx, [esp + 0x54]
push edx
push eax
call dword [sym.imp.MSVCR100.dll__itow]
mov edi, dword [0x4ea818]
add esp, 0xc
push 0x4bd2c4
push str.RegExReplace
push eax
call fcn.00449890
jmp 0x465dbd
mov ecx, dword [0x4e86f0]
push ecx
call fcn.00403e00
jmp 0x465dbd
mov edx, dword [0x4e4b24]
test byte [edx + 0x100], 1
jne 0x465d7d
mov eax, dword [0x4e86f0]
push eax
mov eax, 0xfffffffa
call fcn.00403e00
jmp 0x465da5
push 0xa
lea ecx, [esp + 0x54]
push ecx
push 0xfffffffffffffffa
call dword [sym.imp.MSVCR100.dll__itow]
mov edi, dword [0x4ea818]
add esp, 0xc
push 0x4bd2c4
push str.RegExReplace
push eax
call fcn.00449890
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x465dbd
push eax
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov dword [ebx + 0xc], 0
mov esi, dword [esp + 0x44]
test esi, esi
je 0x465e31
cmp byte [esi + 0x17], 0
jne 0x465dce
mov esi, dword [esi + 0xc]
mov al, byte [esi + 0x15]
test al, 2
je 0x465de4
and al, 0x3d
mov byte [esi + 0x15], al
mov eax, dword [esi]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, dword [esp + 0x2c]
cdq
mov dword [esi], eax
mov al, byte [esi + 0x15]
and al, 0x9b
or al, 0x18
mov dword [esi + 4], edx
mov byte [esi + 0x15], al
jns 0x465e0c
mov eax, esi
call fcn.00401160
and byte [esi + 0x15], 0x8f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x4e8054], 0
je 0x465e19
test al, 0x10
jne 0x465e26
cmp dword [0x4e8058], 0
je 0x465e31
test al, 0x20
je 0x465e31
test al, 8
je 0x465e31
mov eax, esi
call fcn.00401160
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret