Function at 0x406320
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48ab94
mov eax, dword fs:[0]
push eax
sub esp, 0x454
mov eax, dword [0x4b1070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0x20]
push 0x400
xor edi, edi
mov dword [ebp - 4], 0
lea eax, [ebp - 0x410]
push edi
push eax
call fcn.0046a2f0
add esp, 0xc
lea eax, [ebp - 0x410]
push 0x400
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp byte [ebp - 0x410], 0
mov dword [ebp - 0x414], 0xf
mov dword [ebp - 0x418], edi
mov byte [ebp - 0x428], 0
jne 0x4063a6
xor ecx, ecx
jmp 0x4063b9
lea ecx, [ebp - 0x410]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4063b0
sub ecx, edx
push ecx
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x428]
call fcn.004070d0
sub esp, 8
mov byte [ebp - 4], 1
lea eax, [ebp - 0x45c]
mov byte [ebp - 0x45c], 0x5c
lea ecx, [ebp - 0x428]
push eax
call fcn.00406fa0
inc eax
lea ecx, [ebp - 0x428]
push eax
push 0
lea eax, [ebp - 0x440]
push eax
call fcn.00406d10
mov ebx, eax
lea eax, [ebp - 0x428]
cmp eax, ebx
je 0x406453
mov eax, dword [ebp - 0x414]
cmp eax, 0x10
jb 0x40642c
inc eax
lea ecx, [ebp - 0x428]
push eax
push dword [ebp - 0x428]
call fcn.00402390
push ebx
lea ecx, [ebp - 0x428]
mov dword [ebp - 0x414], 0xf
mov dword [ebp - 0x418], 0
mov byte [ebp - 0x428], 0
call fcn.00401eb0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x42c]
cmp eax, 0x10
jb 0x406475
inc eax
lea ecx, [ebp - 0x440]
push eax
push dword [ebp - 0x440]
call fcn.00402390
sub esp, 8
mov byte [ebp - 0x45c], 0x5c
lea eax, [ebp - 0x45c]
lea ecx, [ebp + 8]
push eax
call fcn.00406fa0
push eax
push 0
lea eax, [ebp - 0x458]
push eax
lea ecx, [ebp + 8]
call fcn.00406d10
mov byte [ebp - 4], 3
lea eax, [ebp - 0x458]
cmp dword [ebp - 0x444], 0x10
cmovae eax, dword [ebp - 0x458]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp dword [ebp + 0x1c], 0x10
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x4065de
push str.DllUnregisterServer
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x406526
call eax
test eax, eax
jns 0x406554
push eax
lea eax, [ebp - 0x440]
push eax
call fcn.004040d0
push eax
mov ecx, esi
call fcn.00406dc0
mov eax, dword [ebp - 0x42c]
cmp eax, 0x10
jb 0x406551
inc eax
lea ecx, [ebp - 0x440]
push eax
push dword [ebp - 0x440]
call fcn.00402390
jmp 0x406551
push 1
push 0x49f0b4
mov ecx, esi
call fcn.004070d0
push 0xffffffffffffffff
push 0
lea eax, [ebp + 8]
mov ecx, esi
push eax
call fcn.00407300
push 0x18
push 0x49f0b8
mov ecx, esi
call fcn.004071d0
or edi, 0xffffffff
push str.DllRegisterServer
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4065b8
call eax
test eax, eax
jns 0x40659f
push eax
lea eax, [ebp - 0x440]
push eax
call fcn.004040d0
push eax
mov ecx, esi
call fcn.00406dc0
mov eax, dword [ebp - 0x42c]
cmp eax, 0x10
jb 0x406609
inc eax
lea ecx, [ebp - 0x440]
push eax
push dword [ebp - 0x440]
call fcn.00402390
jmp 0x406609
sub esp, 0x18
mov ecx, esp
push 0x49f0e8
call fcn.00406e40
call fcn.004477f0
add esp, 0x18
jmp 0x40660c
push 1
push 0x49f0b4
mov ecx, esi
call fcn.004070d0
push 0xffffffffffffffff
push 0
lea eax, [ebp + 8]
mov ecx, esi
push eax
call fcn.00407300
push 0x16
push 0x49f0f4
jmp 0x406602
push 5
push 0x49f10c
mov ecx, esi
call fcn.004070d0
push 0xffffffffffffffff
push 0
lea eax, [ebp + 8]
mov ecx, esi
push eax
call fcn.00407300
push 5
push 0x49f114
mov ecx, esi
call fcn.004071d0
or edi, 0xffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x444]
cmp eax, 0x10
jb 0x406631
inc eax
lea ecx, [ebp - 0x458]
push eax
push dword [ebp - 0x458]
call fcn.00402390
mov eax, dword [ebp - 0x414]
mov dword [ebp - 0x444], 0xf
mov dword [ebp - 0x448], 0
mov byte [ebp - 0x458], 0
cmp eax, 0x10
jb 0x40666a
inc eax
lea ecx, [ebp - 0x428]
push eax
push dword [ebp - 0x428]
call fcn.00402390
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x414], 0xf
mov dword [ebp - 0x418], 0
mov byte [ebp - 0x428], 0
cmp ecx, 0x10
jb 0x40669a
inc ecx
push ecx
push dword [ebp + 8]
lea ecx, [ebp + 8]
call fcn.00402390
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00451a48
mov esp, ebp
pop ebp
ret 0x1c