Function at 0x422af0
Capabilities:
Create process on windows
Delete file
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x12f0
call fcn.00429120
mov eax, dword [0x47a42c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
push edi
push dword [ebp + 0xc]
push ebx
push str.SendFailureReport
push str._ws__d__d_0x_lx_
call fcn.00420880
add esp, 0x14
cmp dword [0x479ba0], ebx
jne 0x422b48
cmp dword [0x47c328], edi
jne 0x422b48
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428a27
mov esp, ebp
pop ebp
ret
cmp dword [0x47bc50], 0
mov dword [0x479ba0], ebx
mov dword [0x47c328], edi
jne 0x422b86
push 0
push str.SendFailureReport
push str._ws____g_dwDeviceId_d__this_func_should_ONLY_be_called_for_EMS_deployment
call fcn.00420880
add esp, 0xc
mov eax, 0xfffffffd
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428a27
mov esp, ebp
pop ebp
ret
push esi
push 0x20a
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.0042b800
add esp, 0xc
cmp dword [0x479b1c], 0
jne 0x422be1
push 0x104
lea eax, [ebp - 0x210]
push eax
push 1
push 0
call dword [sym.imp.USER32.dll_LoadStringW]
mov esi, eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.SendFailureReport
push str._ws____EMS_server_is_not_specified_in_command_line__read_it_from_internal_resource__ret_d__err_d__str_hs
call fcn.00420880
add esp, 0x14
jmp 0x422c07
cmp dword [0x479b20], 8
mov eax, 0x479b0c
cmovae eax, dword [0x479b0c]
push eax
push str.SendFailureReport
push str._ws____EMS_server_is_set_to__hs
call fcn.00420880
add esp, 0xc
cmp word [ebp - 0x210], 0
jne 0x422c39
push str.SendFailureReport
push str._ws____EMS_server_is_empty__return_error_now
call fcn.00420880
add esp, 8
mov eax, 0xfffffffc
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428a27
mov esp, ebp
pop ebp
ret
push 0x20c
lea eax, [ebp - 0x1290]
mov dword [ebp - 0x1298], 0x6c
push 0
push eax
mov dword [ebp - 0x1294], str.SendFailureReport.exe
call fcn.0042b800
push 0x20c
lea eax, [ebp - 0x107c]
mov dword [ebp - 0x1084], 0x6d
push 0
push eax
mov dword [ebp - 0x1080], str.cacert_EMS.pem
call fcn.0042b800
push 0x20c
lea eax, [ebp - 0xe68]
mov dword [ebp - 0xe70], 0x6e
push 0
push eax
mov dword [ebp - 0xe6c], str.server_EMS.crt
call fcn.0042b800
push 0x420
lea eax, [ebp - 0xc54]
mov dword [ebp - 0xc5c], 0x6f
push 0
push eax
mov dword [ebp - 0xc58], str.server_EMS.key
call fcn.0042b800
add esp, 0x30
cmp dword [ebp - 0x1298], 0
je 0x422d89
lea edi, [ebp - 0x1290]
nop dword [eax + eax]
push 0x20a
lea eax, [ebp - 0x834]
push 0
push eax
call fcn.0042b800
push dword [edi - 4]
lea eax, [ebp - 0x834]
push str.__temp___s
push 0x104
push eax
call fcn.00410d00
add esp, 0x1c
lea eax, [ebp - 0x834]
push 0x104
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0
push edi
call fcn.0043b2eb
add esp, 8
test eax, eax
je 0x422d76
movzx eax, word [edi - 8]
push edi
push eax
push 0x17
call fcn.0041d9f0
add esp, 0xc
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.SendFailureReport
push str._ws____ExtractResouceFile___returned__d__err_d__path_s
call fcn.00420880
add esp, 0x14
test esi, esi
js 0x422e45
add edi, 0x214
cmp dword [edi - 8], 0
jne 0x422cf0
mov edi, dword [ebp + 0x10]
xorps xmm0, xmm0
mov dword [ebp - 0x12f0], 0x44
xor eax, eax
movlpd qword [ebp - 0x12ec], xmm0
push 0x20a
push eax
mov word [ebp - 0x12ae], ax
mov word [ebp - 0x12c0], ax
lea eax, [ebp - 0x41c]
push eax
movlpd qword [ebp - 0x12e4], xmm0
movlpd qword [ebp - 0x12dc], xmm0
movlpd qword [ebp - 0x12d4], xmm0
movlpd qword [ebp - 0x12cc], xmm0
movlpd qword [ebp - 0x12be], xmm0
movlpd qword [ebp - 0x12b6], xmm0
movups xmmword [ebp - 0x12ac], xmm0
mov dword [ebp - 0x12c4], 1
call fcn.0042b800
mov eax, dword [ebp + 0xc]
add esp, 0xc
test edi, edi
je 0x422e5b
push edi
push eax
push ebx
push dword [0x47bc50]
lea eax, [ebp - 0x210]
push dword [0x47bc54]
push eax
lea eax, [ebp - 0x1290]
push eax
push str._s__s__s__i__d__d__d__t__d__e__d__r__u
push 0xffffffffffffffff
lea eax, [ebp - 0x41c]
push 0x105
push eax
call fcn.00414570
add esp, 0x2c
jmp 0x422e92
pop esi
pop edi
mov eax, 0xfffffff6
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428a27
mov esp, ebp
pop ebp
ret
push eax
push ebx
push dword [0x47bc50]
lea eax, [ebp - 0x210]
push dword [0x47bc54]
push eax
lea eax, [ebp - 0x1290]
push eax
push str._s__s__s__i__d__d__d__t__d__e__d
push 0xffffffffffffffff
lea eax, [ebp - 0x41c]
push 0x105
push eax
call fcn.00414570
add esp, 0x28
push 0x20a
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.0042b800
push 0xffffffffffffffff
lea eax, [ebp - 0x1290]
push eax
lea eax, [ebp - 0x628]
push 0x105
push eax
call fcn.0043d175
lea eax, [ebp - 0x628]
push 0x5c
push eax
call fcn.0042ca77
add esp, 0x24
test eax, eax
je 0x422ed9
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x12ac]
push eax
lea eax, [ebp - 0x12f0]
push eax
lea eax, [ebp - 0x628]
push eax
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x41c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov esi, eax
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.SendFailureReport
push str._ws____CreateProcess___returned__d__err_d__curdir_s__cmd_s
call fcn.00420880
add esp, 0x18
test esi, esi
je 0x422fc6
push 0xea60
push dword [ebp - 0x12ac]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x422f71
push str.SendFailureReport
push str._ws____timeout_waiting_for_SendFailureReport_process
call fcn.00420880
add esp, 8
push 1
push dword [ebp - 0x12ac]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
lea eax, [ebp - 0x129c]
mov dword [ebp - 0x129c], 0
push eax
push dword [ebp - 0x12ac]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x129c]
push str.SendFailureReport
push str._ws____child_process_returned__d
call fcn.00420880
push edi
push dword [ebp + 0xc]
push ebx
push dword [ebp - 0x129c]
call fcn.00416d50
add esp, 0x1c
push dword [ebp - 0x12ac]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
jmp 0x422fe4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SendFailureReport
push str._ws____CreateProcess___failed__err_d
call fcn.00420880
add esp, 0xc
mov ebx, 0xfffffff5
cmp dword [ebp + 0x14], 0
je 0x42301e
cmp dword [ebp - 0x1298], 0
lea esi, [ebp - 0x1298]
je 0x42301e
nop dword [eax]
cmp dword [0x47c090], 0
jne 0x423013
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
add esi, 0x214
cmp dword [esi], 0
jne 0x423000
push ebx
push str.SendFailureReport
push str._ws____returned__d
call fcn.00420880
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, ebx
xor ecx, ebp
pop esi
pop edi
pop ebx
call fcn.00428a27
mov esp, ebp
pop ebp
ret