Function at 0x402a9c
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
push ebx
push esi
push edi
xor edi, edi
push edi
push 1
push 0x80000002
push 0x401678
lea ecx, [ebp - 0x34]
call fcn.004037a8
cmp dword [0x405038], 2
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
je 0x402b08
lea eax, [ebp - 0x10]
push eax
push 0x401814
lea ecx, [ebp - 0x34]
call fcn.00403a2e
cmp eax, edi
jne 0x402aed
mov ebx, 0x80070005
jmp 0x402cab
push eax
push dword [ebp - 0x10]
call dword [sym.imp.OLEAUT32.dll_DllRegisterServer]
cmp eax, edi
mov dword [ebp - 0xc], eax
jne 0x402b08
mov ebx, 0x8007000e
jmp 0x402cab
push 0x401808
call dword [sym.imp.KERNEL32.dll_AddAtomA]
lea eax, [ebp - 0x138]
push eax
call fcn.00403ba7
test eax, eax
je 0x402b30
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x14]
push eax
push 0x4018ac
push edi
push 3
push 0x4014fc
call dword [sym.imp.ole32.dll_CoGetClassObject]
mov ebx, eax
cmp ebx, edi
jl 0x402bf0
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push 0x405138
push 0x4013ec
push edi
push eax
call dword [ecx + 0xc]
mov ebx, eax
cmp ebx, edi
jl 0x402be7
push 0x20
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, edi
pop ecx
je 0x402b80
mov ecx, eax
call fcn.00402a14
jmp 0x402b82
xor eax, eax
cmp eax, edi
mov dword [0x40513c], eax
je 0x402bb6
push dword [0x405138]
push eax
call fcn.004024e4
mov ebx, eax
cmp ebx, edi
jl 0x402bb6
mov eax, dword [0x405138]
lea edx, [ebp - 0x18]
push edx
push edi
mov dword [ebp - 0x18], 0x21
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
mov ebx, eax
mov eax, dword [0x405138]
lea edx, [ebp - 8]
push edx
mov dword [ebp - 8], edi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x402be7
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push 0x405148
push 0x4013fc
push eax
call dword [ecx]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp dword [0x405138], edi
je 0x402cab
call fcn.00402737
mov ecx, dword [0x40513c]
mov eax, dword [0x405138]
mov edx, dword [eax]
mov esi, ecx
add ecx, 0xc
push 0x40514c
neg esi
sbb esi, esi
push 3
and esi, ecx
push esi
push eax
call dword [edx + 0x2c]
cmp eax, edi
jge 0x402c2d
mov ebx, eax
jmp 0x402cab
mov eax, dword [0x40514c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x402c43
mov ebx, 0x80004005
jmp 0x402cab
push 0x40
mov esi, 0x4050f8
push esi
push 0x65
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
push esi
lea ecx, [ebp - 4]
call fcn.004023d1
mov eax, dword [0x405138]
mov ecx, dword [eax]
push 2
push 0x10
push 0x10051
push dword [ebp - 0xc]
push dword [ebp - 4]
push 0x405140
push eax
call dword [ecx + 0x38]
push dword [ebp - 0xc]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ebx, eax
call esi
cmp ebx, edi
jl 0x402ca1
mov eax, dword [0x405140]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x38]
mov ebx, eax
cmp dword [ebp - 4], edi
je 0x402cab
push dword [ebp - 4]
call esi
lea ecx, [ebp - 0x34]
call fcn.0040397e
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret