Function at 0x40b394
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffff6b0
mov ebp, edx
mov dword [esp], eax
push str.MAPI32.DLL
call sub.KERNEL32.DLL_LoadLibraryA
mov edi, eax
test edi, edi
jne 0x40b3ba
xor eax, eax
jmp 0x40b636
push str.MAPISendMail
push edi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [esp + 4], eax
cmp dword [esp + 4], 0
jne 0x40b3dd
push edi
call sub.KERNEL32.DLL_FreeLibrary
xor eax, eax
jmp 0x40b636
test ebp, ebp
je 0x40b3eb
xor edx, edx
mov dl, byte [ebp]
cmp edx, 0x2e
je 0x40b3ef
xor ecx, ecx
jmp 0x40b3f4
mov ecx, 1
mov byte [esp + 8], cl
cmp byte [esp + 8], 0
je 0x40b408
inc ebp
cmp byte [ebp], 0
jne 0x40b408
xor ebp, ebp
lea eax, [esp + 0xc]
push eax
lea edx, [esp + 0x14]
push edx
push 0x104
push dword [esp + 0xc]
call sub.KERNEL32.DLL_GetFullPathNameA
push 0x18
push 0
lea ecx, [esp + 0x11c]
push ecx
call fcn.00436584
add esp, 0xc
mov dword [esp + 0x11c], 0xffffffff
lea eax, [esp + 0x10]
mov dword [esp + 0x120], eax
mov edx, dword [esp + 0xc]
mov dword [esp + 0x124], edx
push 0x30
push 0
lea ecx, [esp + 0x134]
push ecx
call fcn.00436584
add esp, 0xc
mov dword [esp + 0x154], 1
lea eax, [esp + 0x114]
mov dword [esp + 0x158], eax
lea eax, [esp + 0x15c]
call fcn.0040b644
test ebp, ebp
je 0x40b57f
mov ebx, ebp
test ebx, ebx
je 0x40b55f
lea eax, [esp + 0x15c]
mov edx, 1
call fcn.0040b680
mov esi, dword [esp + 0x14c]
shl esi, 3
lea esi, [esi + esi*2]
add esi, dword [esp + 0x15c]
push 0x18
push 0
push esi
call fcn.00436584
add esp, 0xc
push str.SMTP:
lea eax, [esp + 0x16c]
push eax
call fcn.00436704
add esp, 8
push ebx
lea edx, [esp + 0x16c]
push edx
call fcn.00436628
add esp, 8
push 0x43f2aa
push ebx
call fcn.004367dd
add esp, 8
mov ebx, eax
test ebx, ebx
je 0x40b51c
inc ebx
xor ecx, ecx
mov cl, byte [ebx]
push ecx
call fcn.00438d04
pop ecx
test eax, eax
jne 0x40b50c
push 0x43f2aa
lea eax, [esp + 0x16c]
push eax
call fcn.004367dd
add esp, 8
test eax, eax
je 0x40b538
mov byte [eax], 0
mov dword [esi + 4], 1
lea edx, [esp + 0x168]
push edx
call fcn.00436868
pop ecx
mov dword [esi + 0xc], eax
inc dword [esp + 0x14c]
test ebx, ebx
jne 0x40b4a0
mov ecx, dword [esp + 0x15c]
mov dword [esp + 0x150], ecx
mov eax, dword [esp + 0xc]
mov dword [esp + 0x134], eax
mov dword [esp + 0x130], eax
lea edx, [esp + 0x550]
push edx
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
push 0
test ebp, ebp
je 0x40b59e
mov ecx, 1
jmp 0x40b5a3
mov ecx, 9
push ecx
lea eax, [esp + 0x134]
push eax
push 0
push 0
call dword [esp + 0x18]
test eax, eax
sete bl
and ebx, 1
xor esi, esi
jmp 0x40b5d5
lea eax, [esi + esi*2]
mov edx, dword [esp + 0x15c]
push dword [edx + eax*8 + 0xc]
call fcn.0043570c
pop ecx
inc esi
cmp esi, dword [esp + 0x160]
jl 0x40b5c0
lea ecx, [esp + 0x550]
push ecx
call sub.KERNEL32.DLL_SetCurrentDirectoryA
push edi
call sub.KERNEL32.DLL_FreeLibrary
test bl, bl
je 0x40b605
cmp byte [esp + 8], 0
je 0x40b605
push dword [esp]
call fcn.00437d84
pop ecx
test bl, bl
jne 0x40b621
push dword [esp]
mov eax, 0xe50
call fcn.0040dfac
push eax
push 0
call fcn.004272dc
add esp, 0xc
mov eax, ebx
push eax
lea eax, [esp + 0x160]
mov edx, 2
call fcn.0040b654
pop eax
add esp, 0x950
pop ebp
pop edi
pop esi
pop ebx
ret