Function at 0x403da3
Capabilities:
Set current directory

Disassembly:
mov eax, 0x4436ec
call fcn.004361ac
sub esp, 0x44
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov dword [ebp - 0x20], ecx
je 0x403dc9
cmp dword [ecx + 0xbb8], ebx
jne 0x403dc9
or dword [ebp + 8], 8
push dword [ebp + 0xc]
push dword [ebp + 8]
push str._Autoup__WriteEvent__dwType_d___s_
push 1
call fcn.0040874d
lea eax, [ebp - 0x1c]
mov edi, str.SoftwareAhnLabDynaUpdateExtra
push eax
push ebx
mov esi, 0x80000002
push edi
lea eax, [ebp - 0x14]
push esi
push eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x1c], ebx
call fcn.004064af
add esp, 0x24
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], ebx
mov eax, dword [eax - 4]
cmp eax, ebx
je 0x403f4c
cmp dword [ebp - 0x1c], 1
jne 0x403e4a
push ebx
lea ecx, [ebp - 0x14]
call fcn.00406944
push eax
push edi
lea eax, [ebp - 0x10]
push esi
push eax
call fcn.00406354
add esp, 0x14
push 0x5c
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00406caa
cmp eax, ebx
jge 0x403e5b
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], bl
call fcn.004065ed
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.004065ed
jmp 0x403f22
push eax
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x10]
call fcn.00406d45
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call fcn.00406944
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [ebp - 0x20]
lea esi, [eax + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
cmp edi, ebx
jbe 0x403f80
push ebx
push str.AszLog.dll
lea ecx, [ebp - 0x10]
call fcn.00406c18
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
cmp edi, ebx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x18], ebx
jbe 0x403ed6
mov al, byte [esi]
mov ecx, dword [ebp - 0x20]
push 8
push eax
call fcn.004042f0
cmp eax, ebx
je 0x403ecc
cmp dword [ebp - 0x2c], ebx
je 0x403fc0
inc dword [ebp - 0x18]
inc esi
inc esi
cmp dword [ebp - 0x18], edi
jb 0x403eb2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x10]
call fcn.00406944
push eax
push str._Autoup__WriteEvent__DLL_Load_Error___s__GetLastError___d_
push 1
call fcn.0040874d
add esp, 0x10
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 1
call fcn.004065ed
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], bl
call fcn.004065ed
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.004065ed
mov esi, 0x80000002
mov edi, str.SoftwareAhnLabDynaUpdateExtra
inc dword [ebp - 0x28]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push dword [ebp - 0x28]
mov dword [ebp - 0x1c], ebx
push edi
push esi
push eax
call fcn.004064af
add esp, 0x14
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], ebx
cmp dword [eax - 4], ebx
jne 0x403e0f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.004065ed
mov eax, dword [0x4629dc]
lea ecx, [eax + 0xa94]
call fcn.00406944
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8
mov edi, dword [ebp - 0x20]
lea esi, [edi + 0xbd4]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, ebx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], ebx
jbe 0x403ed6
mov al, byte [esi]
push 8
push eax
mov ecx, edi
call fcn.004042f0
cmp eax, ebx
jne 0x403fc0
inc dword [ebp - 0x18]
inc esi
mov eax, dword [ebp - 0x18]
inc esi
cmp eax, dword [ebp - 0x2c]
jb 0x403f9e
jmp 0x403ed6
lea ecx, [ebp - 0x10]
call fcn.00406944
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x403ed6
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SDExtraLogOpen
push eax
call esi
push str.SDExtraLogWrite
mov edi, eax
push dword [ebp - 0x18]
call esi
push str.SDExtraLogClose
mov dword [ebp - 0x2c], eax
push dword [ebp - 0x18]
call esi
cmp edi, ebx
mov esi, eax
je 0x4040a8
cmp dword [ebp - 0x2c], ebx
je 0x4040a8
cmp esi, ebx
je 0x4040a8
lea eax, [ebp - 0x30]
lea ecx, [ebp - 0x24]
push eax
call fcn.00406944
push eax
push ebx
lea ecx, [ebp - 0x14]
call fcn.00406944
push eax
call edi
add esp, 0x10
cmp eax, ebx
lea ecx, [ebp - 0x10]
jne 0x40409b
call fcn.00406944
push eax
push str._Autoup__WriteEvent____s_
push 1
call fcn.0040874d
push 0x20
lea eax, [ebp - 0x50]
push ebx
push eax
call fcn.00436360
mov eax, dword [ebp + 8]
or dword [ebp - 0x50], 0xffffffff
add esp, 0x18
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x48], eax
push ebx
push str.TriMJG.dll
call fcn.00406c51
cmp eax, 0xffffffff
je 0x404083
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x50]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x30]
call dword [ebp - 0x2c]
lea eax, [ebp - 0x30]
push eax
call esi
add esp, 0x10
jmp 0x4040c0
call fcn.00406944
push eax
push str._Autoup__WriteEvent__LogOpen_Error___s_
jmp 0x4040b6
lea ecx, [ebp - 0x10]
call fcn.00406944
push eax
push str._Autoup__WriteEvent__fptr_Error___s_
push 1
call fcn.0040874d
add esp, 0xc
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x403ef5