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

Disassembly:
sub esp, 0x78c
mov eax, dword [0x5a4aa8]
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 0x4d1c54
xor eax, eax
jmp 0x4d1da3
test esi, esi
je 0x4d20e0
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4d1c61
sub eax, edx
je 0x4d20e0
cmp dword [esp + 0x79c], 0
je 0x4d20e0
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 0x52d1c8
call ebp
mov ecx, ebx
call sym.Setup.exe_private:_int___thiscall_SNMPManager::isTrapServerRunning_void_
test eax, eax
jne 0x4d1dec
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 0x4d1d9c
push 0x44
lea eax, [esp + 0x3c]
push 0
push eax
call fcn.004fd670
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 0x4d1d95
lea edi, [esp + 0x69c]
add edi, 0xffffffff
lea ebx, [ebx]
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x4d1d20
mov dx, word [0x56ac00]
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 0x4d1d40
mov ecx, dword [str.SecTrap.exe]
mov edx, dword [0x52d180]
mov dword [eax], ecx
mov ecx, dword [0x52d184]
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 0x4d1dbc
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.004fa103
add esp, 0x78c
ret 8
push 0x1f40
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4d1dda
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffa2
jmp 0x4d1da1
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 0x4d1e01
push eax
call fcn.004da999
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 0x4d1e06
sub eax, edx
add eax, 1
push eax
call fcn.004da969
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 0x4d1e23
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 0x4d1e40
sub eax, edx
lea esi, [eax + 0xb]
push esi
call fcn.004da969
push esi
mov ebp, eax
push 0
push ebp
mov dword [esp + 0x20], ebp
call fcn.004fd670
mov eax, dword [ebx]
add esp, 0x10
mov ecx, eax
lea ebx, [ebx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4d1e70
mov edi, ebp
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x4d1e82
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 0x4d1ea0
mov ecx, dword [str.RegSuccess]
mov dword [eax], ecx
mov edx, dword [0x52cff8]
mov dword [eax + 4], edx
mov cx, word [0x52cffc]
push ebp
push 0
mov word [eax + 8], cx
mov dl, byte [0x52cffe]
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 0x4d1d9c
mov eax, dword [ebx]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4d1ef0
sub eax, edx
lea esi, [eax + 0xb]
push esi
call fcn.004da969
push esi
mov ebp, eax
push 0
push ebp
call fcn.004fd670
mov eax, dword [ebx]
add esp, 0x10
mov ecx, eax
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4d1f16
mov edi, ebp
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x4d1f28
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 0x4d1f45
mov ecx, dword [str.RegFailure]
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [eax], ecx
mov edx, dword [0x52cfec]
mov dword [eax + 4], edx
mov cx, word [0x52cff0]
push ebp
xor edi, edi
push edi
mov word [eax + 8], cx
mov dl, byte [0x52cff2]
push edi
push edi
mov byte [eax + 0xa], dl
call esi
cmp eax, edi
mov dword [esp + 0x18], eax
jne 0x4d1f94
mov eax, dword [esp + 0x14]
push eax
jmp 0x4d1d96
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 0x4d1d9c
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 0x4d1fd0
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 0x4d1da1
push 0x2710
push edi
lea edx, [esp + 0x1c]
push edx
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x4d2069
push str.SNMPManager___Registration_Successful_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [esp + 0x34]
push eax
push 0
push ebx
push 0x4d16a0
push 0
push 0
mov dword [ebx + 0x10], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
test edi, edi
je 0x4d2090
mov ecx, dword [esp + 0x20]
xor ebx, ebx
cmp dword [ecx + 0xc], ebx
jne 0x4d2060
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x1f4
call esi
mov edx, dword [esp + 0x20]
cmp dword [edx + 0xc], ebx
je 0x4d2050
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4d2095
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 0x4d2090
cmp dword [esp + 0x7c], 3
mov ebx, dword [esp + 0x698]
je 0x4d2095
mov ebx, 0xffffffaa
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4d20a6
push eax
call fcn.004da999
add esp, 4
test ebp, ebp
je 0x4d20b3
push ebp
call fcn.004da999
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 0x4d1da1
mov eax, 0xffffffab
jmp 0x4d1da3