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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1074
call fcn.0041a3e0
mov eax, dword [0x41b014]
xor eax, esp
mov dword [esp + 0x1070], eax
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
push 0x2000
mov dword [esp + 0x18], edi
call dword [sym.imp.msvcrt.dll_malloc]
mov ebx, eax
mov dword [esp], 0x2000
mov dword [esp + 0x1c], ebx
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
mov dword [esp + 0x20], eax
xor eax, eax
push eax
push 9
push 0x110a
push dword [0x41b080]
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], eax
mov byte [esp + 0x22], al
mov byte [esp + 0x23], al
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [0x41b080]
mov edx, eax
push 3
push 0x1000
push ebx
mov dword [esp + 0x28], eax
call fcn.0040af0b
xor ebx, ebx
inc ebx
push ebx
push 0xffffffffffffffff
push edi
mov edi, dword [esp + 0x24]
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_CompareStringOrdinal]
cmp eax, 2
jne 0x4052c9
push edi
call dword [sym.imp.msvcrt.dll_free]
push dword [esp + 0x24]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
pop ecx
mov eax, ebx
jmp 0x4056ac
mov ecx, dword [esp + 0x1c]
call fcn.00407dc7
mov edx, dword [0x41b0dc]
test esi, esi
je 0x4052e4
cmp eax, edx
je 0x4052e4
mov dword [esp + 0x1c], edx
mov ecx, dword [0x41b080]
mov ebx, 0x1000
push 3
push ebx
push edi
call fcn.0040af0b
xor eax, eax
mov dword [esp + 0x58], 0x401664
push ebx
push eax
lea eax, [esp + 0x80]
mov dword [esp + 0x64], 0x401670
push eax
mov dword [esp + 0x6c], 0x401698
mov dword [esp + 0x70], 0x4016a4
mov dword [esp + 0x74], 0x4016c8
mov dword [esp + 0x78], 0x4016d4
mov dword [esp + 0x7c], 0x4016f8
mov dword [esp + 0x80], 0x401700
call sub.msvcrt.dll_memset
mov ebx, dword [esp + 0x20]
lea edi, [esp + 0x64]
add esp, 0xc
mov esi, dword [edi]
xor edx, edx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, dx
jne 0x40535e
sub esi, ecx
sar esi, 1
push esi
push ebx
push dword [edi]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x405391
lea ecx, [ebx + esi*2]
movzx eax, word [ecx]
test ax, ax
je 0x40539e
push 0x5c
pop edx
cmp ax, dx
je 0x40539e
add edi, 8
lea eax, [esp + 0x78]
cmp edi, eax
jne 0x405357
jmp 0x4053bc
push ecx
push dword [edi + 4]
lea eax, [esp + 0x80]
push 0x401718
push 0x800
push eax
call fcn.00402540
add esp, 0x14
cmp word [esp + 0x78], 0
jne 0x4053d3
push ebx
mov edx, 0x800
lea ecx, [esp + 0x7c]
call fcn.00404881
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x405489
mov esi, dword [esp + 0x18]
cmp edi, dword [0x41b0dc]
je 0x405489
push edi
push 3
push 0x110a
push dword [0x41b080]
call dword [sym.imp.USER32.dll_SendMessageW]
mov ebx, eax
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x405489
mov ecx, dword [0x41b080]
mov edi, ebx
push 3
push 0x1000
push esi
mov edx, ebx
mov dword [esp + 0x28], edi
call fcn.0040af0b
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [esp + 0x24]
jne 0x40542d
sub ecx, edx
lea eax, [esp + 0x78]
sar ecx, 1
push ecx
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcsncmp]
add esp, 0xc
test eax, eax
jne 0x4053e3
mov edx, esi
xor edi, edi
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, di
jne 0x405459
sub edx, ecx
lea ecx, [esp + 0x78]
sar edx, 1
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x40546f
sub ecx, esi
sar ecx, 1
cmp edx, ecx
jne 0x405489
mov byte [esp + 0x13], 1
jmp 0x405491
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x14], ebx
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x78]
push eax
mov edx, 0x1000
mov ecx, esi
call fcn.00404881
mov edx, esi
mov dword [esp + 0x28], esi
mov edi, esi
xor esi, esi
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, si
jne 0x4054b3
sub edx, ecx
mov ecx, dword [esp + 0x18]
sar edx, 1
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [esp + 0x24]
jne 0x4054c9
sub ecx, esi
sar ecx, 1
cmp edx, ecx
jb 0x40553b
xor ebx, ebx
inc ebx
push 0x5c
pop eax
push eax
push edi
call dword [sym.imp.msvcrt.dll_wcschr]
mov esi, eax
mov dword [esp + 0x34], esi
pop ecx
pop ecx
test esi, esi
je 0x405529
mov ecx, dword [esp + 0x18]
xor eax, eax
mov word [esi], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [esp + 0x24]
jne 0x405504
mov eax, dword [esp + 0x20]
sub ecx, edx
sar ecx, 1
lea eax, [eax + ecx*2]
cmp esi, eax
ja 0x405529
mov al, byte [esp + 0x12]
lea edi, [esi + 2]
jmp 0x40552f
mov al, bl
mov byte [esp + 0x12], al
test al, al
je 0x4054e1
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x1c]
push eax
push 4
push 0x110a
push dword [0x41b080]
call dword [sym.imp.USER32.dll_SendMessageW]
mov esi, eax
test esi, esi
je 0x405649
xor eax, eax
mov byte [esp + 0x12], al
push esi
push 1
push 0x110a
push dword [0x41b080]
call dword [sym.imp.USER32.dll_SendMessageW]
push 0xa
pop ecx
mov dword [esp + 0x14], eax
lea edi, [esp + 0x30]
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x18]
lea eax, [esp + 0x30]
push eax
xor eax, eax
mov dword [esp + 0x38], esi
push eax
push 0x113e
push dword [0x41b080]
mov dword [esp + 0x40], 1
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], 0x1000
call dword [sym.imp.USER32.dll_SendMessageW]
push 1
push 0xffffffffffffffff
push dword [esp + 0x30]
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_CompareStringOrdinal]
cmp eax, 2
jne 0x40563b
push esi
push eax
push 0x1102
push dword [0x41b080]
call dword [sym.imp.USER32.dll_SendMessageW]
push esi
push 4
push 0x110a
push dword [0x41b080]
call dword [sym.imp.USER32.dll_SendMessageW]
cmp byte [esp + 0x12], 0
mov edi, eax
jne 0x4056a0
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4056a0
push 0x5c
pop ecx
add eax, 2
push ecx
push eax
mov dword [esp + 0x30], eax
call dword [sym.imp.msvcrt.dll_wcschr]
mov dword [esp + 0x34], eax
pop ecx
pop ecx
test eax, eax
jne 0x405634
mov byte [esp + 0x12], 1
jmp 0x40563f
xor ecx, ecx
mov word [eax], cx
jmp 0x40563f
mov edi, dword [esp + 0x14]
mov esi, edi
test edi, edi
jne 0x405563
mov al, byte [esp + 0x13]
test al, al
je 0x40567a
push ebx
xor eax, eax
push eax
push 0x1114
push dword [0x41b080]
call dword [sym.imp.USER32.dll_SendMessageW]
push ebx
push 9
push 0x110b
push dword [0x41b080]
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [esp + 0x18]
call dword [sym.imp.msvcrt.dll_free]
push dword [esp + 0x24]
call dword [sym.imp.msvcrt.dll_free]
cmp byte [esp + 0x1b], 0
pop ecx
pop ecx
je 0x4056aa
test ebx, ebx
je 0x4056aa
xor eax, eax
inc eax
jmp 0x4056ac
mov al, 1
mov ebx, esi
mov byte [esp + 0x13], al
jmp 0x40564d
xor eax, eax
mov ecx, dword [esp + 0x107c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00419cc0
mov esp, ebp
pop ebp
ret