Function at 0x40add0
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f2df5
mov eax, dword fs:[0]
push eax
sub esp, 0xca0
mov eax, dword [0x53c160]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, 0x5101cc
call fcn.00481600
mov ecx, str.SeCreateGlobalPrivilege
call fcn.00481600
push 0
call dword [sym.imp.ole32.dll_OleInitialize]
mov esi, eax
test esi, esi
js 0x40b81e
push 0
push 0
push 0
push 0
mov dword [ebp - 4], 1
call dword [sym.imp.USER32.dll_DefWindowProcW]
lea eax, [ebp - 0xbe0]
mov dword [ebp - 0xbe0], 8
push eax
mov dword [ebp - 0xbdc], 4
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
sub esp, 0xc
mov dword [ebp - 0xbdc], 0x548714
mov ecx, 0x548714
call fcn.0040d1f0
mov esi, eax
test esi, esi
js 0x40b850
push 0xfffffffffffffff6
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.DLL_GetStdHandle]
mov esi, eax
xor eax, eax
push esi
mov dword [ebp - 0xb88], eax
mov dword [ebp - 0xb8c], eax
call dword [sym.imp.KERNEL32.DLL_GetFileType]
sub eax, 1
je 0x40b058
sub eax, 2
jne 0x40b05e
mov dword [ebp - 0xb8c], esi
test esi, esi
je 0x40b05e
push str.DBWIN_BUFFER
push eax
push 4
call dword [sym.imp.KERNEL32.DLL_OpenFileMappingW]
test eax, eax
setne cl
mov byte [ebp - 0xb79], cl
test eax, eax
je 0x40aeec
cmp eax, 0xffffffff
je 0x40aeec
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov cl, byte [ebp - 0xb79]
test cl, cl
je 0x40b05e
mov ecx, esi
call fcn.0040a980
mov dword [ebp - 0xb8c], eax
mov byte [ebp - 4], 4
mov edi, dword [0x5485e0]
add edi, 0x10
push edi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov esi, dword [0x54874c]
test esi, esi
je 0x40af45
lfence
cmp dword [esi + 4], 0
jle 0x40af45
lfence
cmp dword [esi + 4], 0
jle 0x40b86e
mov eax, dword [esi]
push dword [eax]
call dword [sym.imp.USER32.dll_DestroyWindow]
mov esi, dword [0x54874c]
lfence
test esi, esi
je 0x40af7a
mov eax, dword [esi]
test eax, eax
je 0x40af61
push eax
call fcn.004d217e
add esp, 4
mov dword [esi], 0
push 0xc
push esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
call fcn.004c3baf
add esp, 8
push edi
mov dword [0x54874c], 0
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
lfence
mov esi, dword [0x548748]
test esi, esi
je 0x40afd6
mov eax, dword [esi]
test eax, eax
je 0x40afad
push eax
call fcn.004d217e
add esp, 4
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x40afc4
push eax
call fcn.004d217e
add esp, 4
mov dword [esi + 4], 0
push 0xc
push esi
mov dword [esi + 8], 0
call fcn.004c3baf
add esp, 8
mov byte [ebp - 4], 5
mov esi, dword [0x548740]
test esi, esi
je 0x40b013
lfence
cmp dword [esi], 0
je 0x40b013
nop dword [eax]
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x40affd
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [esi + 0x20]
push 0
mov dword [esi + 0x10], 0
call eax
add esi, 0x24
cmp dword [esi], 0
jne 0x40aff0
mov esi, dword [0x53d1e8]
mov ecx, dword [0x53d1ec]
cmp esi, ecx
jae 0x40b03d
mov eax, dword [esi]
test eax, eax
je 0x40b036
mov eax, dword [eax + 0x1c]
push 0
call eax
mov ecx, dword [0x53d1ec]
add esi, 4
cmp esi, ecx
jb 0x40b023
mov ecx, 0x548714
call fcn.0040d320
call dword [sym.imp.ole32.dll_OleUninitialize]
mov eax, dword [ebp - 0xb8c]
jmp 0x40b803
mov dword [ebp - 0xb88], esi
lea ecx, [ebp - 0xb78]
call fcn.004454d0
xorps xmm0, xmm0
mov dword [ebp - 0xbd8], 0x548714
mov dword [ebp - method.WTL::CMessageLoop.virtual_0], vtable.WTL::CMessageLoop.0
movups xmmword [ebp - 0xbd0], xmm0
mov dword [ebp - 0xbc0], 0
mov dword [ebp - 0xbbc], 0
movups xmmword [ebp - 0xbb8], xmm0
mov dword [ebp - 0xba0], 0
movq qword [ebp - 0xba8], xmm0
mov eax, dword [0x5485e0]
add eax, 0x10
push eax
mov dword [ebp - 0xb84], eax
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov esi, dword [0x548748]
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
mov ecx, dword [esi + 8]
mov edi, eax
push 4
inc ecx
push ecx
push dword [esi]
call fcn.004d21a4
add esp, 0xc
test eax, eax
je 0x40b12b
mov dword [esi], eax
mov eax, dword [esi + 8]
push 4
inc eax
push eax
push dword [esi + 4]
call fcn.004d21a4
add esp, 0xc
test eax, eax
je 0x40b12b
mov ecx, dword [esi + 8]
mov dword [esi + 4], eax
lea edx, [ecx*4]
mov ecx, dword [esi]
add ecx, edx
je 0x40b11c
mov dword [ecx], edi
mov eax, dword [esi + 4]
add eax, edx
je 0x40b128
lea ecx, [ebp - 0xbd4]
mov dword [eax], ecx
inc dword [esi + 8]
push dword [ebp - 0xb84]
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
lea ecx, [ebp - 0xb9c]
mov byte [ebp - 4], 8
call fcn.00481790
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0xb98]
sub eax, dword [ebp - 0xb9c]
sar eax, 3
imul eax, eax, 0xaaaaaaab
mov dword [ebp - 0xb84], 1
cmp eax, 1
jbe 0x40b2e2
mov eax, dword [ebp + 0xc]
mov edi, 0x18
mov dword [ebp - 0xb80], eax
nop dword [eax + eax]
push 1
mov byte [ebp - 4], 0xb
call fcn.004af47b
mov esi, eax
mov dword [ebp - 0xbe4], esi
mov byte [ebp - 4], 0xc
lea eax, [ebp - 0xbe8]
mov ecx, dword [ebp - 0xb9c]
mov edx, str._min
add ecx, edi
push eax
call fcn.0040c1e0
add esp, 8
mov byte [ebp - 0xb79], al
mov byte [ebp - 4], 0xa
test esi, esi
je 0x40b1fe
mov edx, dword [esi]
mov ecx, esi
mov edx, dword [edx + 8]
call edx
test eax, eax
je 0x40b1f8
mov ecx, dword [eax]
push 1
mov edx, dword [ecx]
mov ecx, eax
call edx
mov al, byte [ebp - 0xb79]
test al, al
je 0x40b212
mov esi, 6
mov dword [ebp - 0xb80], esi
jmp 0x40b2b3
push 1
mov byte [ebp - 4], 0xd
call fcn.004af47b
mov esi, eax
mov dword [ebp - 0x2c], esi
mov byte [ebp - 4], 0xe
lea eax, [ebp - 0x30]
mov ecx, dword [ebp - 0xb9c]
mov edx, str._log
add ecx, edi
push eax
call fcn.0040c1e0
add esp, 8
mov byte [ebp - 0xb79], al
mov byte [ebp - 4], 0xa
test esi, esi
je 0x40b26a
mov edx, dword [esi]
mov ecx, esi
mov edx, dword [edx + 8]
call edx
test eax, eax
je 0x40b264
mov ecx, dword [eax]
push 1
mov edx, dword [ecx]
mov ecx, eax
call edx
mov al, byte [ebp - 0xb79]
test al, al
jne 0x40b2ad
mov eax, dword [ebp - 0xb9c]
add eax, edi
mov ecx, eax
mov edx, dword [eax + 0x14]
cmp edx, 8
jb 0x40b282
mov ecx, dword [eax]
cmp word [ecx], 0x2f
je 0x40b2ad
cmp dword [ebp - 0x18], 0
jne 0x40b87a
lea ecx, [ebp - 0x28]
cmp ecx, eax
je 0x40b2ad
mov ecx, dword [eax + 0x10]
cmp edx, 8
jb 0x40b2a3
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x28]
call fcn.00406c30
mov esi, dword [ebp - 0xb80]
mov eax, dword [ebp - 0xb98]
add edi, 0x18
sub eax, dword [ebp - 0xb9c]
mov ecx, dword [ebp - 0xb84]
sar eax, 3
inc ecx
imul eax, eax, 0xaaaaaaab
mov dword [ebp - 0xb84], ecx
cmp ecx, eax
jb 0x40b1a0
jmp 0x40b2e5
mov esi, dword [ebp + 0xc]
sub esp, 0x10
mov eax, esp
push ecx
lea ecx, [ebp - 0xb78]
mov dword [eax], 0
call fcn.0040bd30
test eax, eax
je 0x40b895
push esi
push dword [ebp - 0xb74]
call dword [sym.imp.USER32.dll_ShowWindow]
push 1
mov byte [ebp - 4], 0x10
call fcn.004af47b
mov esi, eax
mov dword [ebp - 0x2c], esi
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 0x11
push eax
lea ecx, [ebp - 0x28]
call fcn.0040c340
add esp, 8
mov byte [ebp - 0xb79], al
mov byte [ebp - 4], 0xa
test esi, esi
je 0x40b35f
mov edx, dword [esi]
mov ecx, esi
mov edx, dword [edx + 8]
call edx
test eax, eax
je 0x40b359
mov ecx, dword [eax]
push 1
mov edx, dword [ecx]
mov ecx, eax
call edx
mov al, byte [ebp - 0xb79]
test al, al
je 0x40b377
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0xb78]
call fcn.0044c880
jmp 0x40b45f
cmp dword [ebp - 0x18], 0
je 0x40b393
push 0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0xb78]
call fcn.0044f1d0
jmp 0x40b45f
mov eax, dword [ebp - 0xb88]
test eax, eax
je 0x40b443
push ecx
push eax
lea ecx, [ebp - 0xca8]
call fcn.0040bbe0
lea eax, [ebp - 0xb90]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemTimeAsFileTime]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov byte [ebp - 4], 0x13
lea eax, [ebp - 0x40]
push dword [ebp - 0xb8c]
lea ecx, [ebp - 0xb78]
push dword [ebp - 0xb90]
push eax
lea eax, [ebp - 0xca8]
push eax
call fcn.0044f690
mov byte [ebp - 4], 0x12
mov edx, dword [ebp - 0x2c]
cmp edx, 0x10
jb 0x40b432
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40b428
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b8ae
push edx
push ecx
call fcn.004c3baf
add esp, 8
lea ecx, [ebp - 0xca8]
mov byte [ebp - 4], 0xa
call fcn.0040ac50
jmp 0x40b45f
mov eax, dword [ebp - 0xb8c]
test eax, eax
je 0x40b45f
push eax
call fcn.00481710
push eax
lea ecx, [ebp - 0x328]
call fcn.00495260
mov edi, dword [sym.imp.USER32.dll_PeekMessageW]
mov ecx, 1
xor esi, esi
mov dword [ebp - 0xb80], ecx
test ecx, ecx
je 0x40b4b8
push 0
push 0
push 0
push 0
lea eax, [ebp - 0xbb8]
push eax
call edi
test eax, eax
jne 0x40b4b8
mov eax, dword [ebp - 0xbd4]
mov ecx, esi
inc esi
push ecx
lea ecx, [ebp - 0xbd4]
mov eax, dword [eax + 8]
cmp eax, fcn.0040d160
jne 0x40b4ac
call fcn.0040d160
jmp 0x40b4ae
call eax
test eax, eax
jne 0x40b476
mov dword [ebp - 0xb80], eax
push 0
push 0
push 0
lea eax, [ebp - 0xbb8]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
mov ecx, dword [ebp - 0xb80]
cmp eax, 0xffffffff
je 0x40b472
test eax, eax
je 0x40b591
mov eax, dword [ebp - 0xbd4]
mov eax, dword [eax + 4]
cmp eax, fcn.0040d100
jne 0x40b502
lea eax, [ebp - 0xbb8]
push eax
lea ecx, [ebp - 0xbd4]
call fcn.0040d100
jmp 0x40b511
lea ecx, [ebp - 0xbb8]
push ecx
lea ecx, [ebp - 0xbd4]
call eax
test eax, eax
jne 0x40b52f
lea eax, [ebp - 0xbb8]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0xbb8]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
mov eax, dword [ebp - 0xbd4]
mov eax, dword [eax + 0xc]
cmp eax, method.WTL::CMessageLoop.virtual_12
jne 0x40b56f
mov eax, dword [ebp - 0xbb4]
mov ecx, dword [ebp - 0xb80]
cmp eax, 0x118
ja 0x40b568
je 0x40b472
cmp eax, 0xf
je 0x40b472
cmp eax, 0xa0
jmp 0x40b580
cmp eax, 0x200
jmp 0x40b586
lea ecx, [ebp - 0xbb8]
push ecx
lea ecx, [ebp - 0xbd4]
call eax
test eax, eax
mov ecx, dword [ebp - 0xb80]
je 0x40b472
jmp 0x40b465
mov eax, dword [ebp - 0xbb0]
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0xb88], eax
cmp edx, 8
jb 0x40b5db
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40b5d1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b8b3
push edx
push ecx
call fcn.004c3baf
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
lea ecx, [ebp - 0xb9c]
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call fcn.0040bf10
mov byte [ebp - 4], 0x14
mov eax, dword [0x5485e0]
mov esi, dword [ebp - 0xbd8]
add eax, 0x10
push eax
mov dword [ebp - 0xb8c], eax
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edi, dword [esi + 0x34]
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
mov esi, dword [edi + 8]
xor ecx, ecx
test esi, esi
jle 0x40b64b
mov edx, dword [edi]
nop dword [eax]
cmp dword [edx], eax
je 0x40b63e
inc ecx
add edx, 4
cmp ecx, esi
jl 0x40b630
jmp 0x40b64b
cmp ecx, 0xffffffff
je 0x40b64b
push ecx
mov ecx, edi
call fcn.0040cf10
push dword [ebp - 0xb8c]
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [ebp - 0xbc4]
mov dword [ebp - method.WTL::CMessageLoop.virtual_0], vtable.WTL::CMessageLoop.0
test eax, eax
je 0x40b67e
push eax
call fcn.004d217e
add esp, 4
mov dword [ebp - 0xbc4], 0
mov eax, dword [ebp - 0xbd0]
mov dword [ebp - 0xbc0], 0
mov dword [ebp - 0xbbc], 0
test eax, eax
je 0x40b6af
push eax
call fcn.004d217e
add esp, 4
mov dword [ebp - 0xbd0], 0
lea ecx, [ebp - 0xb78]
mov dword [ebp - 0xbcc], 0
mov dword [ebp - 0xbc8], 0
call fcn.00446210
mov edi, dword [0x5485e0]
add edi, 0x10
push edi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [0x54874c]
mov esi, eax
test eax, eax
je 0x40b6ff
cmp dword [eax + 4], 0
jle 0x40b703
mov eax, dword [eax]
push dword [eax]
call dword [sym.imp.USER32.dll_DestroyWindow]
mov esi, dword [0x54874c]
test esi, esi
je 0x40b731
mov eax, dword [esi]
test eax, eax
je 0x40b718
push eax
call fcn.004d217e
add esp, 4
mov dword [esi], 0
push 0xc
push esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
call fcn.004c3baf
add esp, 8
push edi
mov dword [0x54874c], 0
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov esi, dword [0x548748]
test esi, esi
je 0x40b78a
mov eax, dword [esi]
test eax, eax
je 0x40b761
push eax
call fcn.004d217e
add esp, 4
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x40b778
push eax
call fcn.004d217e
add esp, 4
mov dword [esi + 4], 0
push 0xc
push esi
mov dword [esi + 8], 0
call fcn.004c3baf
add esp, 8
mov byte [ebp - 4], 0x16
mov esi, dword [0x548740]
test esi, esi
je 0x40b7c3
cmp dword [esi], 0
je 0x40b7c3
nop dword [eax]
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x40b7ad
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [esi + 0x20]
push 0
mov dword [esi + 0x10], 0
call eax
add esi, 0x24
cmp dword [esi], 0
jne 0x40b7a0
mov esi, dword [0x53d1e8]
mov ecx, dword [0x53d1ec]
cmp esi, ecx
jae 0x40b7ed
mov eax, dword [esi]
test eax, eax
je 0x40b7e6
mov eax, dword [eax + 0x1c]
push 0
call eax
mov ecx, dword [0x53d1ec]
add esi, 4
cmp esi, ecx
jb 0x40b7d3
mov ecx, 0x548714
call fcn.0040d320
call dword [sym.imp.ole32.dll_OleUninitialize]
mov eax, dword [ebp - 0xb88]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004c3ba1
mov esp, ebp
pop ebp
ret
push 0x51b784
lea ecx, [ebp - 0x58]
lfence
call fcn.004086c0
lea eax, [ebp - 0x58]
mov dword [ebp - 4], 0
push eax
push esi
lea ecx, [ebp - 0x3c]
call fcn.00480f30
push 0x538a58
lea eax, [ebp - 0x3c]
push eax
call fcn.004c5b2b
push str.CAppModule::Init
lea ecx, [ebp - 0x58]
lfence
call fcn.004086c0
lea edx, [ebp - 0x58]
mov byte [ebp - 4], 2
mov ecx, esi
call fcn.00480f60
push 1
push 0xc000008c
call fcn.00409e40
push str.multiple_filenames_specified_on_commandline
lea ecx, [ebp - 0x34]
call fcn.00410110
push 0x5383a8
lea eax, [ebp - 0x34]
push eax
call fcn.004c5b2b
push str.Main_window_creation_failed_
lea ecx, [ebp - 0x58]
call fcn.00405430
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0xf
call fcn.00480ff0
call fcn.004cecff
call fcn.004cecff
int3