Function at 0x40409c
Capabilities:
Accept command line arguments

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
push ebx
xor edx, edx
push esi
push edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x14], edx
mov esi, 0x406528
mov dword [0x406538], edx
mov dword [0x406528], edx
mov edi, 0x406520
mov dword [0x406540], 1
mov dword [0x406544], edx
mov dword [0x406520], 0x401880
mov dword [0x406004], esi
mov ecx, dword [edi]
lea eax, [esi + 8]
push eax
push edx
push edx
lea eax, [esp + 0x34]
mov dword [esp + 0x34], ecx
push eax
push 1
push ecx
push esi
mov dword [esp + 0x48], edx
lea edi, [edi + 4]
push 0x403ea0
mov dword [esi + 0x20], ecx
call dword [sym.imp.api_ms_win_eventing_classicprovider_l1_1_0.dll_RegisterTraceGuidsW]
mov esi, dword [esi]
push 0
pop edx
test esi, esi
jne 0x4040ea
mov ebx, dword [ebp + 8]
mov ecx, ebx
push 0x7b
pop edx
call fcn.004048fa
push 0xa
pop ecx
xor eax, eax
lea edi, [esp + 0x30]
push 0x2710
rep stosd dword es:[edi], eax
push ebx
mov dword [esp + 0x3c], 0x404090
mov dword [esp + 0x48], ebx
call dword [sym.imp.USER32.dll_LoadIconW]
push 0x7f00
xor esi, esi
mov dword [esp + 0x48], eax
push esi
call dword [sym.imp.USER32.dll_LoadCursorW]
mov dword [esp + 0x48], eax
mov edi, 0x401824
lea eax, [esp + 0x30]
mov dword [esp + 0x4c], 6
push eax
mov dword [esp + 0x40], 4
mov dword [esp + 0x58], edi
call dword [sym.imp.USER32.dll_RegisterClassW]
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], esi
call fcn.00404889
test eax, eax
je 0x404460
call fcn.004048ec
push esi
push ebx
push esi
push esi
push esi
push esi
mov eax, 0x80000000
push eax
push eax
push esi
push 0x40187c
push edi
push 0x80
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov ecx, dword [esp + 0x10]
mov edi, eax
mov dword [esp + 0x1c], edi
call fcn.004048de
test edi, edi
je 0x404460
lea eax, [esp + 0x14]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.api_ms_win_shcore_obsolete_l1_1_0.dll_CommandLineToArgvW]
mov ebx, eax
test ebx, ebx
je 0x4043c2
cmp dword [esp + 0x14], 1
jle 0x404386
push esi
push esi
push 0x401854
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LoadLibraryExW]
mov esi, eax
mov dword [esp + 0x28], esi
test esi, esi
je 0x404352
mov ecx, esi
call fcn.0040464d
mov dword [esp + 0x24], eax
test eax, eax
je 0x404314
mov ecx, dword [ebx]
lea edx, [esp + 0x18]
xor eax, eax
mov dword [esp + 0x18], eax
call fcn.00403ff6
test eax, eax
je 0x4042da
mov edi, dword [esp + 0x18]
push edi
push esi
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4042ab
mov ecx, dword [ebx]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [esp + 0x20]
jne 0x404258
mov eax, dword [ebp + 0x10]
sub ecx, edx
push dword [ebp + 0x14]
sar ecx, 1
lea eax, [eax + ecx*2]
mov ecx, esi
add eax, 2
push eax
push dword [ebp + 8]
push dword [esp + 0x28]
call dword [0x4071d8]
call esi
mov ecx, dword [0x406004]
mov esi, 0x406004
cmp ecx, esi
je 0x4042cd
test byte [ecx + 0x1c], 0x10
je 0x4042cd
push eax
push edi
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.00403de9
jmp 0x4042cd
mov eax, dword [0x406004]
mov esi, 0x406004
cmp eax, esi
je 0x4042cd
test byte [eax + 0x1c], 8
je 0x4042cd
push ecx
push ecx
push edi
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00403e3a
push edi
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
mov edi, dword [esp + 0x1c]
jmp 0x404309
mov eax, dword [0x406004]
mov esi, 0x406004
cmp eax, esi
je 0x404309
test byte [eax + 0x1c], 4
je 0x404309
call fcn.00401db6
push eax
push dword [ebx]
mov eax, dword [0x406004]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xf
pop ecx
call fcn.00403d88
lea ecx, [esp + 0x24]
call fcn.004047f1
jmp 0x404346
mov eax, dword [0x406004]
mov esi, 0x406004
cmp eax, esi
je 0x404346
test byte [eax + 0x1c], 4
je 0x404346
call fcn.00401db6
push eax
mov eax, dword [0x406004]
push 0x401854
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x10
pop ecx
call fcn.00403d88
push dword [esp + 0x28]
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_FreeLibrary]
jmp 0x4043b9
mov eax, dword [0x406004]
mov esi, 0x406004
cmp eax, esi
je 0x4043b9
test byte [eax + 0x1c], 4
je 0x4043b9
call fcn.00401db6
push eax
mov eax, dword [0x406004]
push 0x401854
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x11
pop ecx
call fcn.00403d88
jmp 0x4043b9
mov eax, dword [0x406004]
mov esi, 0x406004
cmp eax, esi
je 0x4043b2
test byte [eax + 0x1c], 8
je 0x4043b2
push 0x80070057
push dword [eax + 0x14]
mov edx, 0x401890
push dword [eax + 0x10]
push 0x12
pop ecx
call fcn.00403d64
mov ecx, edi
call fcn.00403f16
push ebx
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
jmp 0x4043f4
mov eax, dword [0x406004]
mov esi, 0x406004
cmp eax, esi
je 0x4043f4
test byte [eax + 0x1c], 4
je 0x4043f4
call fcn.00401db6
push eax
mov eax, dword [0x406004]
mov edx, 0x401890
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x13
pop ecx
call fcn.00403d64
push edi
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [0x40619c]
cmp eax, 0xffffffff
je 0x404413
push eax
call dword [sym.imp.api_ms_win_core_sidebyside_l1_1_0.dll_ReleaseActCtx]
or dword [0x40619c], 0xffffffff
cmp dword [0x406580], 0
je 0x404423
or dword [0x406580], 0xffffffff
mov edi, dword [0x406004]
cmp edi, esi
je 0x404490
test edi, edi
je 0x404458
xor esi, esi
mov eax, dword [edi + 8]
or eax, dword [edi + 0xc]
je 0x40444d
push dword [edi + 0xc]
push dword [edi + 8]
call dword [sym.imp.api_ms_win_eventing_classicprovider_l1_1_0.dll_UnregisterTraceGuids]
mov dword [edi + 8], esi
mov dword [edi + 0xc], esi
mov edi, dword [edi]
test edi, edi
jne 0x404433
mov esi, 0x406004
mov dword [0x406004], esi
jmp 0x404490
mov eax, dword [0x406004]
cmp eax, 0x406004
je 0x404490
test byte [eax + 0x1c], 4
je 0x404490
call fcn.00401db6
push eax
mov eax, dword [0x406004]
mov edx, 0x401890
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xc
pop ecx
call fcn.00403d64
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10