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

Disassembly:
push 0xffffffffffffffff
push 0x4db268
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5c
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov edi, dword [esp + 0x7c]
mov eax, dword [ebp + 0x389c]
lea esi, [ebp + 0x389c]
xor ebx, ebx
push edi
push eax
mov dword [esp + 0x38], ebp
mov dword [esp + 0x48], ebx
call dword [sym.imp.MSVCRT.dll_wcscmp]
add esp, 8
test eax, eax
je 0x49678e
mov ecx, ebp
call fcn.00495d80
cmp edi, ebx
jne 0x496796
xor eax, eax
jmp 0x49679d
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
push eax
mov ecx, esi
call fcn.00406780
lea ecx, [esp + 0x50]
call fcn.0043e000
mov ecx, ebp
mov dword [esp + 0x74], ebx
call fcn.004a0d10
push eax
lea ecx, [esp + 0x54]
call fcn.0043e540
mov eax, dword [esp + 0x5c]
cmp eax, ebx
jne 0x4967d0
xor edi, edi
jmp 0x4967d9
mov edi, dword [esp + 0x60]
sub edi, eax
sar edi, 2
xor esi, esi
cmp edi, ebx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x20], esi
jle 0x4967fd
mov ecx, dword [ebp + 0x3894]
cmp dword [eax], ecx
je 0x4967ff
inc esi
add eax, 4
cmp esi, edi
jl 0x4967ed
mov dword [esp + 0x20], esi
xor esi, esi
push 0xffffffffffffffff
push str.character
mov dword [esp + 0x28], esi
call fcn.00496d70
push 0xffffffffffffffff
push 0x4fd9b0
mov dword [esp + 0x4c], eax
call fcn.00496d70
add esp, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x48], ebx
cmp esi, edi
jge 0x496be5
lea eax, [esi + 1]
mov dword [esp + 0x38], eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
mov ecx, dword [esp + 0x5c]
lea eax, [esp + 0x24]
push eax
mov byte [esp + 0x78], 3
mov ebp, dword [ecx + esi*4]
mov dword [esp + 0x28], ebx
push ebp
mov dword [esp + 0x54], ebp
mov edx, dword [ebp]
call dword [edx + 0x24]
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x18]
call fcn.00499250
cmp eax, ebx
jge 0x496888
cmp eax, 0x80004002
je 0x496888
push eax
call fcn.004d4bee
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x496b97
mov ecx, dword [esp + 0x10]
cmp ecx, ebx
je 0x4968a6
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov dword [esp + 0x10], ebx
jne 0x4968bc
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
lea edx, [esp + 0x10]
push edx
push eax
call dword [ecx + 0xa4]
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x4968e0
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x20]
push ebx
push edx
push eax
call dword [ecx + 0x48]
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x496907
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x20]
push ebx
push edx
push eax
call dword [ecx + 0x4c]
mov eax, dword [esp + 0x30]
lea edi, [eax + 0x3898]
mov eax, dword [eax + 0x3898]
cmp eax, ebx
jne 0x496951
mov eax, dword [esp + 0x14]
cmp eax, ebx
jne 0x496942
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0xa4]
jmp 0x496b06
lea ecx, [esp + 0x34]
mov dword [esp + 0x34], ebx
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x24]
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x496aa9
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
test eax, eax
je 0x496aa9
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x49698c
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [edi]
lea edx, [esp + 0x10]
mov dword [esp + 0x10], ebx
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x2c]
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x4969b3
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x28]
push edx
push eax
call dword [ecx + 0x24]
cmp dword [esp + 0x28], ebx
je 0x496af7
mov eax, dword [esp + 0x84]
cmp eax, ebx
mov eax, dword [esp + 0x10]
jne 0x496a35
cmp eax, ebx
jne 0x4969e9
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
mov ebp, dword [eax]
mov ecx, dword [esp + 0x28]
mov esi, eax
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_wcslen]
mov edx, dword [esp + 0x44]
add esp, 4
inc eax
push eax
push edx
push esi
call dword [ebp + 0x48]
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x496a21
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x20]
push 1
push edx
push eax
call dword [ecx + 0x4c]
jmp 0x496a94
cmp eax, ebx
jne 0x496a47
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x20]
push ebx
push edx
push eax
call dword [ecx + 0x48]
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x496a6e
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
mov ebp, dword [eax]
mov ecx, dword [esp + 0x28]
mov esi, eax
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_wcslen]
or edx, 0xffffffff
add esp, 4
sub edx, eax
mov eax, dword [esp + 0x40]
push edx
push eax
push esi
call dword [ebp + 0x4c]
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov esi, dword [esp + 0x20]
mov ebp, dword [esp + 0x4c]
jmp 0x496af7
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x496abf
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x20]
push ebx
push ecx
push eax
call dword [edx + 0x48]
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x496ae6
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x20]
push ebx
push ecx
push eax
call dword [edx + 0x4c]
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x496b06
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x44], 0xffffffff
cmp eax, ebx
jne 0x496b24
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x44]
mov edx, dword [eax]
push ecx
mov ecx, dword [esp + 0x84]
push ecx
mov ecx, dword [esp + 0x8c]
neg ecx
sbb ecx, ecx
and ecx, 0xfffffffe
inc ecx
push ecx
mov ecx, dword [esp + 0x88]
push ecx
push eax
call dword [edx + 0x64]
cmp word [esp + 0x44], 0xffff
je 0x496c06
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
cmp eax, edx
jge 0x496b7b
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x30]
mov ecx, dword [eax + esi*4 + 4]
mov dword [edx + 0x3894], ecx
jmp 0x496b85
mov eax, dword [esp + 0x30]
mov dword [eax + 0x3894], ebx
mov eax, dword [edi]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 0x14]
mov dword [edi], ebx
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
mov byte [esp + 0x74], 2
cmp ecx, ebx
je 0x496bae
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov byte [esp + 0x74], 1
je 0x496bbd
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x24]
mov byte [esp + 0x74], bl
cmp eax, ebx
je 0x496bcf
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov ecx, dword [esp + 0x38]
inc esi
inc ecx
cmp esi, edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x38], ecx
jl 0x496839
mov eax, dword [esp + 0x48]
xor esi, esi
inc eax
mov dword [esp + 0x20], esi
cmp eax, 2
mov dword [esp + 0x48], eax
jge 0x496d24
mov edi, dword [esp + 0x2c]
jmp 0x49682a
mov al, byte [esp + 0x80]
mov dword [esp + 0x40], 1
test al, 0x20
jne 0x496cbf
mov eax, dword [esp + 0x10]
mov byte [esp + 0x74], 4
cmp eax, ebx
mov dword [esp + 0x84], ebx
jne 0x496c3f
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x84]
push edx
push eax
call dword [ecx + 0x28]
mov eax, dword [esp + 0x84]
cmp eax, ebx
je 0x496cb0
push eax
call fcn.0043e8b0
add esp, 4
test eax, eax
je 0x496ca1
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x496c7b
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x50]
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x496c97
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
push 1
push eax
call dword [edx + 0x38]
jmp 0x496ca9
mov dword [esp + 0x40], 2
mov eax, dword [esp + 0x84]
cmp eax, ebx
mov byte [esp + 0x74], 3
je 0x496cbf
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x496cd5
push 0x80004003
call fcn.004d4bee
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x30]
mov edx, dword [eax]
lea ecx, [esi + 0x3898]
push ecx
push eax
call dword [edx + 0x2c]
mov eax, dword [esp + 0x10]
mov dword [esi + 0x3894], ebp
cmp eax, ebx
mov byte [esp + 0x74], 2
je 0x496cff
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x14]
mov byte [esp + 0x74], 1
cmp eax, ebx
je 0x496d12
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x24]
mov byte [esp + 0x74], bl
cmp eax, ebx
je 0x496d24
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x496d33
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
cmp eax, ebx
pop ebx
je 0x496d46
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea ecx, [esp + 0x40]
mov dword [esp + 0x64], 0xffffffff
call fcn.0043e050
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x30]
mov dword fs:[0], ecx
add esp, 0x68
ret 0xc