Function at 0x5982f858
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edx
mov esi, eax
mov eax, dword [ebp - 8]
test eax, eax
je 0x5982f879
xor edx, edx
mov dword [eax], edx
xor eax, eax
push ebp
push 0x5982fbb4
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__LStrClr_qqrpv
xor ebx, ebx
push 0
mov eax, dword [esi + 0x38]
push eax
call dword [0x598580b0]
test eax, eax
je 0x5982fb6e
mov dword [ebp - 0xc], 4
push 0
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push 0
push 0x20000013
mov eax, dword [esi + 0x38]
push eax
call dword [0x598580b4]
test eax, eax
je 0x5982fa84
mov eax, dword [ebp - 0x10]
sub eax, 0xc8
je 0x5982f8f8
add eax, 0xffffff9b
sub eax, 3
jb 0x5982f906
sub eax, 0x61
je 0x5982f9c2
sub eax, 6
je 0x5982fa45
jmp 0x5982fa84
movzx eax, byte [esi + 0x72]
mov byte [esi + 0x73], al
mov bl, 1
jmp 0x5982fa84
xor eax, eax
mov dword [ebp - 0xc], eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0x21
mov eax, dword [esi + 0x38]
push eax
call dword [0x598580b4]
test eax, eax
jne 0x5982fa84
cmp dword [ebp - 0xc], 0
jbe 0x5982fa84
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x5982fa84
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 0xc]
call sub.rtl120.bpl__System__LStrSetLength_qqrv
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
push eax
push 0
push 0x21
mov eax, dword [esi + 0x38]
push eax
call dword [0x598580b4]
test eax, eax
je 0x5982fa84
lea eax, [ebp - 0x20]
mov edx, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov edx, dword [ebp - 0x20]
mov eax, sym.madExcept_.bpl__Madexcept_LastRedirectURL
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
cmp byte [sym.madExcept_.bpl__Madexcept_FollowRedirect], 0
je 0x5982f9b4
cmp byte [esi + 0x14], 0
jne 0x5982f9b4
push 1
push 0
push 0
mov eax, dword [sym.madExcept_.bpl__Madexcept_LastRedirectURL]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
push 0
push 0
call sub.shell32.dll_ShellExecuteA
movzx eax, byte [esi + 0x72]
mov byte [esi + 0x73], al
mov bl, 1
jmp 0x5982fa84
cmp byte [esi + 0x72], 0
je 0x5982f9ce
mov byte [esi + 0x73], 0
jmp 0x5982f9d2
mov byte [esi + 0x72], 1
cmp byte [esi + 0x5d], 0
jne 0x5982fa84
cmp dword [esi + 0x20], 0
je 0x5982fa84
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [esi + 0x38]
push eax
call dword [0x598580b8]
test eax, eax
je 0x5982fa84
mov byte [esi + 0x5d], 1
mov eax, dword [ebp - 0x14]
call fcn.5982f81c
mov edi, eax
mov dword [esi + 0x60], edi
test edi, edi
je 0x5982fa84
push 0
mov eax, dword [esi + 0x24]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [esi + 0x20]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push edi
push 0
mov eax, dword [esi + 0x38]
push eax
call dword [0x598580bc]
cmp eax, 1
sbb eax, eax
inc eax
mov byte [esi + 0x5c], al
jmp 0x5982fa84
cmp byte [esi + 0x64], 0
jne 0x5982fa84
cmp dword [esi + 0x28], 0
je 0x5982fa84
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [esi + 0x38]
push eax
call dword [0x598580b8]
test eax, eax
je 0x5982fa84
mov byte [esi + 0x64], 1
mov eax, dword [ebp - 0x14]
call fcn.5982f81c
mov edi, eax
mov dword [esi + 0x68], edi
test edi, edi
setne al
mov byte [esi + 0x5c], al
test bl, bl
je 0x5982fb96
jmp 0x5982fad7
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 0xc]
call sub.rtl120.bpl__System__LStrSetLength_qqrv
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [esi + 0x38]
push eax
call dword [0x598580c4]
test eax, eax
je 0x5982faef
lea eax, [ebp - 4]
xor edx, edx
call sub.rtl120.bpl__System__EnsureAnsiString_qqrr27System__AnsiStringT_us_i0__us
call sub.rtl120.bpl__System__LStrLen_qqrx27System__AnsiStringT_us_i0__
cmp eax, dword [ebp - 0xc]
jne 0x5982faef
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
call sub.rtl120.bpl__System__LStrCat_qqrv
mov eax, dword [ebp - 8]
lea eax, [ebp - 0xc]
push eax
mov eax, dword [esi + 0x38]
push eax
call dword [0x598580c0]
test eax, eax
je 0x5982faef
cmp dword [ebp - 0xc], 0
ja 0x5982fa8e
push 0
mov esi, dword [sym.imp.madBasic_.bpl__Madstrings_ReplaceTextA]
mov esi, dword [esi]
mov eax, dword [ebp - 8]
mov ecx, 0x5982fbd0
mov edx, 0x5982fbe0
call esi
push 0
mov esi, dword [sym.imp.madBasic_.bpl__Madstrings_ReplaceTextA]
mov esi, dword [esi]
mov eax, dword [ebp - 8]
mov ecx, 0x5982fbf4
mov edx, 0x5982fc04
call esi
push 0
mov esi, dword [sym.imp.madBasic_.bpl__Madstrings_ReplaceTextA]
mov esi, dword [esi]
mov eax, dword [ebp - 8]
mov ecx, 0x5982fc18
mov edx, 0x5982fc28
call esi
push 0
mov esi, dword [sym.imp.madBasic_.bpl__Madstrings_ReplaceTextA]
mov esi, dword [esi]
mov eax, dword [ebp - 8]
mov ecx, 0x5982fc3c
mov edx, 0x5982fc4c
call esi
push 0
mov esi, dword [sym.imp.madBasic_.bpl__Madstrings_ReplaceTextA]
mov esi, dword [esi]
mov eax, dword [ebp - 8]
mov ecx, 0x5982fc60
mov edx, 0x5982fc70
call esi
jmp 0x5982fb96
cmp dword [esi + 0x60], 0
jne 0x5982fb86
cmp dword [esi + 0x68], 0
jne 0x5982fb86
call sub.kernel32.dll_GetLastError
cmp eax, 0x2f00
je 0x5982fb8a
xor eax, eax
jmp 0x5982fb8c
mov al, 1
mov byte [esi + 0x5c], al
mov eax, esi
call fcn.5982fc78
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5982fbbb
lea eax, [ebp - 0x20]
call sub.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__LStrClr_qqrpv
ret