Function at 0x401790
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x298
push esi
push edi
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [esp + 0x2c], eax
test eax, eax
je 0x401ad4
cmp dword [esp + 0x10], 0
je 0x401ad4
xor eax, eax
mov dword [esp + 0x44], 0
push 0x20a
push eax
mov word [esp + 0x58], ax
mov dword [esp + 0x80], eax
mov word [esp + 0x70], ax
lea eax, [esp + 0x98]
push eax
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 7
mov dword [esp + 0x88], 7
call fcn.004042f0
add esp, 0xc
lea eax, [esp + 0x90]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov dword [esp + 0x24], 0
lea ecx, [esp + 0x90]
mov dword [esp + 0x28], 7
mov word [esp + 0x14], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401861
sub ecx, edx
lea eax, [esp + 0x90]
sar ecx, 1
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00402270
mov edi, dword [esp + 0x28]
lea edx, [esp + 0x14]
mov esi, dword [esp + 0x24]
cmp edi, 8
cmovae edx, dword [esp + 0x14]
test esi, esi
je 0x401941
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 0x4018c4
cmp ecx, edx
je 0x401941
sub ecx, 2
cmp word [ecx], 0x5c
jne 0x4018b3
sub ecx, edx
sar ecx, 1
cmp ecx, 0xffffffff
je 0x401941
cmp ecx, esi
ja 0x4018e9
cmp edi, 8
mov dword [esp + 0x24], ecx
lea eax, [esp + 0x14]
cmovae eax, dword [esp + 0x14]
xor edx, edx
mov word [eax + ecx*2], dx
jmp 0x401941
mov edx, ecx
mov eax, edi
sub edx, esi
sub eax, esi
cmp edx, eax
ja 0x40192c
cmp edi, 8
mov dword [esp + 0x24], ecx
lea eax, [esp + 0x14]
cmovae eax, dword [esp + 0x14]
mov dword [esp + 0x30], eax
lea edi, [eax + esi*2]
test edx, edx
je 0x40191d
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 + 0x30]
lea eax, [esi + edx]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x401941
push ecx
push edx
mov byte [esp + 0x38], 0
lea ecx, [esp + 0x1c]
push dword [esp + 0x38]
push edx
call fcn.00402430
push str.Battle.net.exe
lea ecx, [esp + 0x18]
call fcn.004021f0
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 + 0x64]
movaps xmmword [esp + 0x80], xmm0
movq qword [esp + 0x30], xmm1
cmp edx, 8
jb 0x4019c2
mov ecx, dword [esp + 0x50]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4019aa
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401ade
push edx
push ecx
call fcn.00402922
movaps xmm0, xmmword [esp + 0x88]
add esp, 8
movq xmm1, qword [esp + 0x30]
mov edx, dword [esp + 0x28]
movq qword [esp + 0x60], xmm1
movups xmmword [esp + 0x50], xmm0
cmp edx, 8
jb 0x401a09
mov ecx, dword [esp + 0x14]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4019ff
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401ae3
push edx
push ecx
call fcn.00402922
add esp, 8
mov esi, 1
cmp dword [esp + 0x10], esi
jle 0x401aae
nop dword [eax + eax]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 7
mov edx, dword [eax + esi*4]
mov ecx, edx
xor eax, eax
mov word [esp + 0x14], 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 + 0x1c]
call fcn.00402270
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x48]
call fcn.00401e80
mov edx, dword [esp + 0x28]
cmp edx, 8
jb 0x401aa3
mov ecx, dword [esp + 0x14]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401a99
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401ade
push edx
push ecx
call fcn.00402922
add esp, 8
inc esi
cmp esi, dword [esp + 0x10]
jl 0x401a20
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ecx
lea ecx, [esp + 0x48]
call fcn.00401af0
lea ecx, [esp + 0x44]
call fcn.00401570
lea ecx, [esp + 0x44]
call fcn.00401cd0
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x10
call fcn.0040602c
call fcn.0040602c
int3