Function at 0x4926c0
Capabilities:
Create process on windows
Create thread
Get common file path
Print debug messages

Disassembly:
sub esp, 0x78c
mov eax, dword [0x51c080]
xor eax, esp
mov dword [esp + 0x788], eax
push ebx
mov ebx, ecx
cmp dword [ebx + 0xc], 1
push esi
mov esi, dword [esp + 0x798]
mov dword [esp + 0x18], ebx
mov dword [esp + 8], esi
jne 0x4926f4
xor eax, eax
jmp 0x492843
test esi, esi
je 0x492b80
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x492701
sub eax, edx
je 0x492b80
cmp dword [esp + 0x79c], 0
je 0x492b80
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
push str.SNMPManager___Registry_Request_from
call ebp
push esi
call ebp
push 0x4d4e78
call ebp
mov ecx, ebx
call sym.Setup.exe_private:_int___thiscall_SNMPManager::isTrapServerRunning_void_
test eax, eax
jne 0x49288c
push str.SNMPManager___TrapServer_not_running_n
call ebp
push str.TrapServerRunningEvent
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
test esi, esi
je 0x49283c
push 0x44
lea eax, [esp + 0x3c]
push 0
push eax
call fcn.004ab450
add esp, 0xc
xor eax, eax
push 0xfa
lea ecx, [esp + 0x6a0]
push ecx
mov dword [esp + 0x40], 0x44
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x492835
lea edi, [esp + 0x69c]
add edi, 0xffffffff
lea ebx, [ebx]
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x4927c0
mov dx, word [0x4fa44c]
lea eax, [esp + 0x69c]
mov word [edi], dx
add eax, 0xffffffff
mov edi, edi
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4927e0
mov ecx, dword [str.SecTrap.exe]
mov edx, dword [0x4d4e30]
mov dword [eax], ecx
mov ecx, dword [0x4d4e34]
mov dword [eax + 4], edx
push str.SNMPManager___Starting_TrapServer..._n
mov dword [eax + 8], ecx
call ebp
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x3c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x6c0]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x49285c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffaa
pop edi
pop ebp
mov ecx, dword [esp + 0x790]
pop esi
pop ebx
xor ecx, esp
call fcn.004a998e
add esp, 0x78c
ret 8
push 0x1f40
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x49287a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffa2
jmp 0x492841
push str.SNMPManager___TrapServer_Started_n
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x10]
mov eax, dword [ebx]
test eax, eax
je 0x4928a1
push eax
call fcn.004993dd
add esp, 4
mov dword [ebx], 0
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4928a6
sub eax, edx
add eax, 1
push eax
call fcn.004993b2
add esp, 4
mov dword [ebx], eax
mov ecx, esi
mov edx, eax
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x4928c3
mov edx, dword [esp + 0x7a4]
mov eax, dword [ebx]
mov dword [ebx + 4], edx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4928e0
sub eax, edx
lea esi, [eax + 0xb]
push esi
call fcn.004993b2
push esi
mov ebp, eax
push 0
push ebp
mov dword [esp + 0x20], ebp
call fcn.004ab450
mov eax, dword [ebx]
add esp, 0x10
mov ecx, eax
lea ebx, [ebx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x492910
mov edi, ebp
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x492922
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
mov eax, ebp
rep movsb byte es:[edi], byte [esi]
add eax, 0xffffffff
nop
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x492940
mov ecx, dword [str.RegSuccess]
mov dword [eax], ecx
mov edx, dword [0x4d4ca8]
mov dword [eax + 4], edx
mov cx, word [0x4d4cac]
push ebp
push 0
mov word [eax + 8], cx
mov dl, byte [0x4d4cae]
push 0
push 0
mov byte [eax + 0xa], dl
call dword [sym.imp.KERNEL32.dll_CreateEventA]
test eax, eax
mov dword [esp + 0x14], eax
je 0x49283c
mov eax, dword [ebx]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x492990
sub eax, edx
lea esi, [eax + 0xb]
push esi
call fcn.004993b2
push esi
mov ebp, eax
push 0
push ebp
call fcn.004ab450
mov eax, dword [ebx]
add esp, 0x10
mov ecx, eax
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4929b6
mov edi, ebp
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x4929c8
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
mov eax, ebp
rep movsb byte es:[edi], byte [esi]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4929e5
mov ecx, dword [str.RegFailure]
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [eax], ecx
mov edx, dword [0x4d4c9c]
mov dword [eax + 4], edx
mov cx, word [0x4d4ca0]
push ebp
xor edi, edi
push edi
mov word [eax + 8], cx
mov dl, byte [0x4d4ca2]
push edi
push edi
mov byte [eax + 0xa], dl
call esi
cmp eax, edi
mov dword [esp + 0x18], eax
jne 0x492a34
mov eax, dword [esp + 0x14]
push eax
jmp 0x492836
push str.SNMPManager___Sending_Reg._Event_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push str.TrapServerRegEvent
push edi
push edi
push edi
call esi
mov esi, eax
cmp esi, edi
mov dword [esp + 0x1c], esi
je 0x49283c
mov eax, dword [ebx]
lea edx, [esp + 0x84]
mov dword [esp + 0x7c], edi
mov dword [esp + 0x80], edi
sub edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x492a70
push esi
lea ecx, [esp + 0x80]
push ecx
push 0x232a
mov ecx, ebx
call sym.Setup.exe_private:_int___thiscall_SNMPManager::accessSharedMem_int__struct__MESSAGE___void__
cmp eax, edi
jne 0x492841
push 0x2710
push edi
lea edx, [esp + 0x1c]
push edx
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x492b09
push str.SNMPManager___Registration_Successful_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [esp + 0x34]
push eax
push 0
push ebx
push 0x492140
push 0
push 0
mov dword [ebx + 0x10], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
test edi, edi
je 0x492b30
mov ecx, dword [esp + 0x20]
xor ebx, ebx
cmp dword [ecx + 0xc], ebx
jne 0x492b00
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x1f4
call esi
mov edx, dword [esp + 0x20]
cmp dword [edx + 0xc], ebx
je 0x492af0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x492b35
push edi
lea eax, [esp + 0x80]
push eax
push 0x2329
mov ecx, ebx
call sym.Setup.exe_private:_int___thiscall_SNMPManager::accessSharedMem_int__struct__MESSAGE___void__
test eax, eax
jne 0x492b30
cmp dword [esp + 0x7c], 3
mov ebx, dword [esp + 0x698]
je 0x492b35
mov ebx, 0xffffffaa
mov eax, dword [esp + 0x10]
test eax, eax
je 0x492b46
push eax
call fcn.004993dd
add esp, 4
test ebp, ebp
je 0x492b53
push ebp
call fcn.004993dd
add esp, 4
mov ecx, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x14]
push edx
call esi
mov eax, dword [esp + 0x18]
push eax
call esi
push str.SNMPManager___Retruning_from_Registration_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, ebx
jmp 0x492841
mov eax, 0xffffffab
jmp 0x492843