Function at 0x496000
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x50dc94]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x5435b4]
test eax, eax
jne 0x49610f
push 0x208
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.004b493e
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call fcn.004b496c
add esp, 8
xor ecx, ecx
mov word [eax + 2], cx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
push 0xffffffffffffffff
push str.FortiAuth.dll
lea eax, [ebp - 0x20c]
push 0x104
push eax
call dword [0x4c5af4]
add esp, 0x10
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x5435b4], eax
test eax, eax
jne 0x49610f
mov eax, dword [0x50f810]
test al, 8
je 0x4960fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x21
push str.SamlAuth::LoadDll
push str._ws____d_LoadLibraryW_error_d_n
push str.__error
push 0x21
push 0
push 0
call fcn.00421090
mov eax, dword [0x50f810]
add esp, 0x20
test al, 8
je 0x4960fc
push 0x4ddcf8
push str.__error
push 0x2b
push 0
push 0
call fcn.00421090
add esp, 0x14
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ae9c0
mov esp, ebp
pop ebp
ret
push str.SamlGetResponseUsingWebBrowser
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x5435a4], eax
test eax, eax
jne 0x49615b
test byte [0x50f810], 8
je 0x496148
push str.FortiAuth.dll
push str.No_function_fGetSamlResponse_in__ws
push str.__error
push 0x31
push eax
push eax
call fcn.00421090
add esp, 0x18
mov eax, 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ae9c0
mov esp, ebp
pop ebp
ret
push str.SamlGetAuthIdUsingExternalBrowser
push dword [0x5435b4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x5435a8], eax
test eax, eax
jne 0x4961ac
test byte [0x50f810], 8
je 0x496199
push str.FortiAuth.dll
push str.No_function_fGetAuthId_in__ws
push str.__error
push 0x37
push eax
push eax
call fcn.00421090
add esp, 0x18
mov eax, 3
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ae9c0
mov esp, ebp
pop ebp
ret
push str.ClearCookies
push dword [0x5435b4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x5435ac], eax
test eax, eax
jne 0x4961fd
test byte [0x50f810], 8
je 0x4961ea
push str.FortiAuth.dll
push str.No_function_fClearCookies_in__ws
push str.__error
push 0x3d
push eax
push eax
call fcn.00421090
add esp, 0x18
mov eax, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ae9c0
mov esp, ebp
pop ebp
ret
push str.SamlGetResponseUsingElectron
push dword [0x5435b4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x5435b0], eax
test eax, eax
jne 0x49624e
test byte [0x50f810], 8
je 0x49623b
push str.FortiAuth.dll
push str.No_function_fGetSamlResponseUsingElectron_in__ws
push str.__error
push 0x43
push eax
push eax
call fcn.00421090
add esp, 0x18
mov eax, 5
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ae9c0
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
call fcn.004ae9c0
mov esp, ebp
pop ebp
ret