Function at 0x401780
Capabilities:
Accept command line arguments
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x2a8
push esi
push edi
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [esp + 0x3c], eax
test eax, eax
je 0x401c42
cmp dword [esp + 0xc], 0
je 0x401c42
xor eax, eax
mov dword [esp + 0x54], 0
push 0x20a
push eax
mov word [esp + 0x68], ax
mov dword [esp + 0x90], eax
mov word [esp + 0x80], ax
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 7
mov dword [esp + 0x98], 7
call fcn.00403d60
add esp, 0xc
lea eax, [esp + 0xa0]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov dword [esp + 0x20], 0
lea ecx, [esp + 0xa0]
mov dword [esp + 0x24], 7
mov word [esp + 0x10], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401857
sub ecx, edx
lea eax, [esp + 0xa0]
sar ecx, 1
push ecx
push eax
lea ecx, [esp + 0x18]
call fcn.00401e80
mov edi, dword [esp + 0x24]
lea edx, [esp + 0x10]
mov esi, dword [esp + 0x20]
cmp edi, 8
cmovae edx, dword [esp + 0x10]
test esi, esi
je 0x40193e
or ecx, 0xffffffff
lea eax, [esi - 1]
cmp eax, ecx
cmovb ecx, eax
cmp word [edx + ecx*2], 0x5c
lea ecx, [edx + ecx*2]
je 0x4018c1
nop dword [eax]
cmp ecx, edx
je 0x40193e
sub ecx, 2
cmp word [ecx], 0x5c
jne 0x4018b0
sub ecx, edx
sar ecx, 1
cmp ecx, 0xffffffff
je 0x40193e
cmp ecx, esi
ja 0x4018e6
cmp edi, 8
mov dword [esp + 0x20], ecx
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
xor edx, edx
mov word [eax + ecx*2], dx
jmp 0x40193e
mov edx, ecx
mov eax, edi
sub edx, esi
sub eax, esi
cmp edx, eax
ja 0x401929
cmp edi, 8
mov dword [esp + 0x20], ecx
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
mov dword [esp + 0x40], eax
lea edi, [eax + esi*2]
test edx, edx
je 0x40191a
xor eax, eax
mov ecx, edx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, dword [esp + 0x40]
lea eax, [esi + edx]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x40193e
push ecx
push edx
mov byte [esp + 0x48], 0
lea ecx, [esp + 0x18]
push dword [esp + 0x48]
push edx
call fcn.00402310
push str.Battle.net.exe
lea ecx, [esp + 0x14]
call fcn.00401da0
xor ecx, ecx
movups xmm0, xmmword [eax]
movq xmm1, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov edx, dword [esp + 0x74]
movaps xmmword [esp + 0x90], xmm0
movq qword [esp + 0x40], xmm1
cmp edx, 8
jb 0x4019bf
mov ecx, dword [esp + 0x60]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4019a7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401c4c
push edx
push ecx
call fcn.0040291d
movaps xmm0, xmmword [esp + 0x98]
add esp, 8
movq xmm1, qword [esp + 0x40]
mov edx, dword [esp + 0x24]
movq qword [esp + 0x70], xmm1
movups xmmword [esp + 0x60], xmm0
cmp edx, 8
jb 0x401a06
mov ecx, dword [esp + 0x10]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4019fc
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401c51
push edx
push ecx
call fcn.0040291d
add esp, 8
mov esi, 1
cmp dword [esp + 0xc], esi
jle 0x401ade
nop word [eax + eax]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 7
mov edx, dword [eax + esi*4]
mov ecx, edx
xor eax, eax
mov word [esp + 0x10], ax
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401a43
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x18]
call fcn.00401e80
mov eax, dword [esp + 0x58]
cmp dword [esp + 0x5c], eax
je 0x401a88
movups xmm0, xmmword [esp + 0x10]
mov dword [eax + 0x10], 0
movups xmmword [eax], xmm0
movq xmm0, qword [esp + 0x20]
movq qword [eax + 0x10], xmm0
add dword [esp + 0x58], 0x18
jmp 0x401ad3
lea ecx, [esp + 0x10]
push ecx
push eax
lea ecx, [esp + 0x5c]
call fcn.004021a0
mov edx, dword [esp + 0x24]
cmp edx, 8
jb 0x401ad3
mov ecx, dword [esp + 0x10]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401ac9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401c56
push edx
push ecx
call fcn.0040291d
add esp, 8
inc esi
cmp esi, dword [esp + 0xc]
jl 0x401a20
push dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x58]
cmp dword [esp + 0x5c], eax
je 0x401b21
mov dword [eax + 0x10], 0
xor ecx, ecx
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
push 0xf
mov word [eax], cx
mov ecx, eax
push str.__from_launcher
call fcn.00401e80
add dword [esp + 0x58], 0x18
jmp 0x401b30
push str.__from_launcher
push eax
lea ecx, [esp + 0x5c]
call fcn.00401fd0
lea ecx, [esp + 0x54]
call fcn.00401560
mov edx, dword [esp + 0x8c]
cmp edx, 8
jb 0x401b78
mov ecx, dword [esp + 0x78]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401b6e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401c56
push edx
push ecx
call fcn.0040291d
add esp, 8
mov edx, dword [esp + 0x74]
xor eax, eax
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 7
mov word [esp + 0x78], ax
cmp edx, 8
jb 0x401bd1
mov ecx, dword [esp + 0x60]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401bc7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401c56
push edx
push ecx
call fcn.0040291d
add esp, 8
mov ecx, dword [esp + 0x54]
xor eax, eax
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 7
mov word [esp + 0x60], ax
test ecx, ecx
je 0x401c42
mov edx, dword [esp + 0x58]
push ecx
call fcn.00402480
mov ecx, dword [esp + 0x60]
mov eax, 0x2aaaaaab
mov esi, dword [esp + 0x58]
add esp, 4
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, esi
shl ecx, 3
cmp ecx, 0x1000
jb 0x401c38
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401c56
push ecx
push esi
call fcn.0040291d
add esp, 8
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x10
call fcn.00406042
call fcn.00406042
call fcn.00406042
int3