Function at 0x403870
Capabilities:
Accept command line arguments
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408358
push 0x4078c0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
mov eax, 0x1604
call fcn.004077c0
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor edi, edi
mov dword [ebp - 0xb40], edi
lea ecx, [ebp - 0xb3c]
call fcn.00401000
mov dword [ebp - 0x128], edi
mov dword [ebp - 4], edi
push 0x40b448
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
mov dword [ebp - 0x124], esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov ebx, eax
mov dword [ebp - 0x120], ebx
push 0x104
lea eax, [ebp - 0x11c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov byte [ebp - 0x19], 0
push edi
push edi
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov dword [ebp - 0xb44], eax
cmp eax, edi
jge 0x40392a
mov dword [ebp - 4], 0xffffffff
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push edi
push edi
push 2
push 2
push edi
push edi
push 0xffffffffffffffff
push edi
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
mov dword [ebp - 0xb44], eax
cmp eax, edi
jl 0x404130
push edi
push edi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x40b464], eax
cmp eax, edi
jne 0x40396d
mov dword [ebp - 0xb40], 1
jmp 0x404130
mov dword [ebp - 0x15ac], 0
mov dword [0x40b430], 0x40a3b0
mov dword [0x40b398], 0x40b3c0
mov dword [0x40b3c0], 0x84
mov dword [0x40b424], 0x300
push esi
push 0x40a908
push 0x40b3c0
mov edi, dword [sym.imp.ATL.DLL_AtlModuleInit]
call edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [0x40b444], eax
push str._UnRegServer
push ebx
call fcn.00403750
add esp, 8
test eax, eax
jne 0x403ffc
push 0x40aa28
push ebx
call fcn.00403750
add esp, 8
test eax, eax
jne 0x403ffc
push str._RegServer
push ebx
call fcn.00403750
add esp, 8
test eax, eax
jne 0x403d26
push 0x40aa10
push ebx
call fcn.00403750
add esp, 8
test eax, eax
jne 0x403d26
push str._Embedding
push ebx
call fcn.00403750
add esp, 8
test eax, eax
jne 0x403c69
push 0x40a9f8
push ebx
call fcn.00403750
add esp, 8
test eax, eax
jne 0x403c69
push 0xfffffffffffffff5
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
call esi
mov dword [ebp - 0xb58], eax
cmp eax, 0xffffffff
je 0x403a79
test eax, eax
je 0x403a79
push 0
lea ecx, [ebp - 0xb54]
push ecx
push 0
push 0x40a9f4
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x403c39
call dword [sym.imp.KERNEL32.dll_AllocConsole]
test eax, eax
je 0x403c39
mov ebx, 1
push ebx
push 0x4037b0
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test eax, eax
jne 0x403aa7
mov dword [ebp - 0xb40], ebx
jmp 0x404130
push 0xfffffffffffffff5
call esi
mov esi, eax
mov dword [ebp - 0xb58], esi
call fcn.00402470
test eax, eax
je 0x403aed
lea edx, [ebp - 0xb70]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
mov eax, 0x3c
cmp word [ebp - 0xb6e], ax
jge 0x403adf
mov word [ebp - 0xb6e], ax
mov eax, dword [ebp - 0xb70]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push ecx
push 0x40a9f0
push str.CONIN_
mov esi, dword [sym.imp.MSVCRT.dll_freopen]
call esi
mov edx, dword [sym.imp.MSVCRT.dll__iob]
add edx, 0x20
push edx
push 0x40a9e4
push str.CONOUT_
call esi
add esp, 0x18
call fcn.00402680
mov dword [ebp - 0xb40], eax
mov eax, dword [0x40b464]
xor edi, edi
cmp eax, edi
je 0x403b3c
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea ecx, [ebp - 0x1584]
call fcn.00401000
push 0x4e79
lea eax, [ebp - 0x1584]
push eax
call fcn.004010a0
add esp, 8
xor esi, esi
mov dword [ebp - 0x1590], esi
lea ecx, [ebp - 0x157c]
test ecx, ecx
je 0x403be7
mov dword [ebp - 0x15e0], ebx
mov dword [ebp - 0x15d8], edi
mov dword [ebp - 0x15d0], edi
mov dword [ebp - 0x15d0], ebx
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
lea edx, [ebp - 0x157c]
push edx
push edi
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
call ebx
mov esi, eax
mov dword [ebp - 0x15d4], esi
test esi, esi
je 0x403bdf
inc esi
mov dword [ebp - 0x15d4], esi
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x15dc], eax
mov edi, eax
mov dword [ebp - 0x15d8], edi
test eax, eax
je 0x403bdf
push 0
push 0
push esi
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x157c]
push eax
push 0
push 0
call ebx
mov esi, edi
mov dword [ebp - 0x1590], esi
push esi
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 4
test esi, esi
je 0x403c04
mov dword [ebp - 0x15e4], esi
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [0x40b464]
test eax, eax
je 0x403c16
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push ecx
mov esi, dword [sym.imp.MSVCRT.dll_fclose]
call esi
mov edx, dword [sym.imp.MSVCRT.dll__iob]
add edx, 0x20
push edx
call esi
add esp, 8
jmp 0x404130
push 1
push 0x4037b0
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test eax, eax
jne 0x403c59
mov dword [ebp - 0xb40], 1
jmp 0x404130
call fcn.00402680
mov dword [ebp - 0xb40], eax
jmp 0x404130
push 0
push 0
mov edi, 1
push edi
push 0
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
call esi
mov dword [0x40b46c], eax
test eax, eax
jne 0x403c91
mov dword [ebp - 0xb40], edi
jmp 0x404130
push 0
push 0
push edi
push 0
call esi
mov dword [0x40b470], eax
test eax, eax
jne 0x403cae
mov dword [ebp - 0xb40], edi
jmp 0x404130
push 0
push 4
push 0x40b3c0
call dword [sym.imp.ATL.DLL_AtlModuleRegisterClassObjects]
mov dword [ebp - 0xb44], eax
mov eax, dword [0x40b470]
mov dword [ebp - 0xb50], eax
mov ecx, dword [0x40b46c]
mov dword [ebp - 0xb4c], ecx
push 0x1d4c0
push 0
lea edx, [ebp - 0xb50]
push edx
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, edi
jne 0x403d16
call fcn.00402680
mov ecx, dword [0x40b460]
test ecx, ecx
je 0x403d08
call fcn.00405e00
push 0xffffffffffffffff
mov eax, dword [0x40b470]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x40b3c0
call dword [sym.imp.ATL.DLL_AtlModuleRevokeClassObjects]
jmp 0x404130
xor edi, edi
push edi
push edi
push 1
push 0x64
push 0x40b3c0
call dword [sym.imp.ATL.DLL_AtlModuleUpdateRegistryFromResourceD]
push edi
push 1
push 0x40b3c0
call dword [sym.imp.ATL.DLL_AtlModuleRegisterServer]
mov dword [ebp - 0xb40], eax
cmp eax, edi
jl 0x403f36
call fcn.00402470
test eax, eax
je 0x404130
mov dword [ebp - 0x15bc], edi
mov dword [ebp - 0x15b4], edi
mov ecx, 0x40b3a0
call fcn.004041e0
mov dword [ebp - 0x15c4], edi
lea ecx, [ebp - 0x15bc]
test ecx, ecx
je 0x403d8e
mov dword [ebp - 0x15bc], edi
lea edx, [ebp - 0x15b4]
test edx, edx
je 0x403d9e
mov dword [ebp - 0x15b4], edi
lea eax, [ebp - 0x15c4]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov dword [ebp - 0x15c8], eax
cmp eax, edi
jne 0x403df8
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
test eax, eax
je 0x403de6
call ebx
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
mov dword [ebp - 0x15c0], esi
mov dword [ebp - 0x15b8], esi
jmp 0x403e36
xor eax, eax
mov esi, eax
mov dword [ebp - 0x15c0], esi
mov dword [ebp - 0x15b8], esi
jmp 0x403e36
lea ecx, [ebp - 0x15b4]
push ecx
lea edx, [ebp - 0x15bc]
push edx
mov eax, dword [ebp - 0x15c4]
push eax
call fcn.00404500
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x15c0], esi
mov ecx, dword [ebp - 0x15c4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x15b8], esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, edi
jl 0x403e72
push edi
mov edx, dword [ebp - 0x15bc]
push edx
mov ecx, 0x40b3a0
call fcn.004042c0
mov esi, eax
mov dword [ebp - 0x15b8], esi
cmp esi, edi
jl 0x403e72
push edi
mov eax, dword [ebp - 0x15b4]
push eax
mov ecx, 0x40b3a0
call fcn.004043e0
mov esi, eax
mov dword [ebp - 0x15b8], esi
mov eax, dword [ebp - 0x15bc]
cmp eax, edi
je 0x403e86
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [ebp - 0x15b4]
cmp eax, edi
je 0x403e9a
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, esi
mov dword [ebp - 0xb40], eax
cmp esi, edi
jl 0x403f36
mov ecx, dword [0x40b3a0]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorLength]
mov dword [ebp - 0xb48], eax
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov esi, eax
mov dword [ebp - 0x1588], esi
mov dword [ebp - 0x128], esi
cmp esi, edi
jne 0x403ee5
mov eax, 0x8007000e
mov dword [ebp - 0xb40], eax
jmp 0x403f36
lea edx, [ebp - 0xb48]
push edx
push esi
mov eax, dword [0x40b3a0]
push eax
call dword [sym.imp.ADVAPI32.dll_MakeSelfRelativeSD]
test eax, eax
jne 0x403f07
call ebx
mov dword [ebp - 0xb40], eax
jmp 0x403f36
mov ecx, dword [ebp - 0xb48]
push ecx
push esi
push str.LaunchPermission
push str.AppID08b0b2d9_3fb3_11d3_a4de_00c04f610189
push 0x80000000
call fcn.00402410
add esp, 0x14
mov dword [ebp - 0xb40], eax
cmp eax, edi
jge 0x404130
xor edi, edi
push eax
push 0x4e89
lea edx, [ebp - 0xb3c]
push edx
call fcn.004010a0
add esp, 0xc
xor esi, esi
mov dword [ebp - 0x1598], esi
lea eax, [ebp - 0xb34]
test eax, eax
je 0x403fd5
xor edi, edi
mov dword [ebp - 0x15fc], edi
mov dword [ebp - 0x15f4], edi
mov dword [ebp - 0x15ec], edi
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
lea ecx, [ebp - 0xb34]
push ecx
push edi
push edi
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
call ebx
mov esi, eax
mov dword [ebp - 0x15f0], esi
test esi, esi
je 0x403fcb
inc esi
mov dword [ebp - 0x15f0], esi
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x15f8], eax
mov edi, eax
mov dword [ebp - 0x15f4], edi
test eax, eax
je 0x403fcb
push 0
push 0
push esi
push eax
push 0xffffffffffffffff
lea edx, [ebp - 0xb34]
push edx
push 0
push 0
call ebx
mov esi, edi
mov dword [ebp - 0x1598], esi
xor edi, edi
push 0x1030
lea eax, [ebp - 0x11c]
push eax
push esi
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp esi, edi
je 0x404130
mov dword [ebp - 0x1600], esi
jmp 0x404127
mov dword [ebp - 0x15b0], 0
mov dword [0x40b430], 0x40a3b0
mov dword [0x40b398], 0x40b3c0
mov dword [0x40b3c0], 0x84
mov dword [0x40b424], 0x300
push esi
push 0x40a950
push 0x40b3c0
call edi
push 0
push 0
push 0
push 0x64
push 0x40b3c0
call dword [sym.imp.ATL.DLL_AtlModuleUpdateRegistryFromResourceD]
push 0
push 0x40b3c0
call dword [sym.imp.ATL.DLL_AtlModuleUnregisterServer]
mov dword [ebp - 0xb40], eax
test eax, eax
jge 0x404130
mov ecx, eax
push ecx
push 0x4e88
lea edx, [ebp - 0xb3c]
push edx
call fcn.004010a0
add esp, 0xc
xor esi, esi
mov dword [ebp - 0x15a0], esi
lea eax, [ebp - 0xb34]
test eax, eax
je 0x404108
mov dword [ebp - 0x1618], esi
xor edi, edi
mov dword [ebp - 0x1610], edi
mov dword [ebp - 0x1608], esi
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
lea ecx, [ebp - 0xb34]
push ecx
push esi
push esi
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
call ebx
mov esi, eax
mov dword [ebp - 0x160c], esi
test esi, esi
je 0x404100
inc esi
mov dword [ebp - 0x160c], esi
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x1614], eax
mov edi, eax
mov dword [ebp - 0x1610], edi
test eax, eax
je 0x404100
push 0
push 0
push esi
push eax
push 0xffffffffffffffff
lea edx, [ebp - 0xb34]
push edx
push 0
push 0
call ebx
mov esi, edi
mov dword [ebp - 0x15a0], esi
push 0x1030
lea eax, [ebp - 0x11c]
push eax
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
test esi, esi
je 0x404130
mov dword [ebp - 0x161c], esi
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [ebp - 0x128]
test eax, eax
je 0x404149
mov dword [ebp - 0x15a4], eax
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [0x40b46c]
test eax, eax
je 0x404163
push eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
jmp 0x404169
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x40b464]
test eax, eax
je 0x404175
push eax
call esi
mov eax, dword [0x40b470]
test eax, eax
je 0x404181
push eax
call esi
push 0x40b448
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push 0x40b3c0
call dword [sym.imp.ATL.DLL_AtlModuleTerm]
jmp 0x4041ba
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xb40]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret