Function at 0x40b398
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 0x40b3be
xor eax, eax
jmp 0x40b63a
push str.MAPISendMail
push edi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [esp + 4], eax
cmp dword [esp + 4], 0
jne 0x40b3e1
push edi
call sub.KERNEL32.DLL_FreeLibrary
xor eax, eax
jmp 0x40b63a
test ebp, ebp
je 0x40b3ef
xor edx, edx
mov dl, byte [ebp]
cmp edx, 0x2e
je 0x40b3f3
xor ecx, ecx
jmp 0x40b3f8
mov ecx, 1
mov byte [esp + 8], cl
cmp byte [esp + 8], 0
je 0x40b40c
inc ebp
cmp byte [ebp], 0
jne 0x40b40c
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.004365a0
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.004365a0
add esp, 0xc
mov dword [esp + 0x154], 1
lea eax, [esp + 0x114]
mov dword [esp + 0x158], eax
lea eax, [esp + 0x15c]
call fcn.0040b648
test ebp, ebp
je 0x40b583
mov ebx, ebp
test ebx, ebx
je 0x40b563
lea eax, [esp + 0x15c]
mov edx, 1
call fcn.0040b684
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.004365a0
add esp, 0xc
push str.SMTP:
lea eax, [esp + 0x16c]
push eax
call fcn.00436720
add esp, 8
push ebx
lea edx, [esp + 0x16c]
push edx
call fcn.00436644
add esp, 8
push 0x43f2aa
push ebx
call fcn.004367f9
add esp, 8
mov ebx, eax
test ebx, ebx
je 0x40b520
inc ebx
xor ecx, ecx
mov cl, byte [ebx]
push ecx
call fcn.00438d20
pop ecx
test eax, eax
jne 0x40b510
push 0x43f2aa
lea eax, [esp + 0x16c]
push eax
call fcn.004367f9
add esp, 8
test eax, eax
je 0x40b53c
mov byte [eax], 0
mov dword [esi + 4], 1
lea edx, [esp + 0x168]
push edx
call fcn.00436884
pop ecx
mov dword [esi + 0xc], eax
inc dword [esp + 0x14c]
test ebx, ebx
jne 0x40b4a4
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 0x40b5a2
mov ecx, 1
jmp 0x40b5a7
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 0x40b5d9
lea eax, [esi + esi*2]
mov edx, dword [esp + 0x15c]
push dword [edx + eax*8 + 0xc]
call fcn.00435728
pop ecx
inc esi
cmp esi, dword [esp + 0x160]
jl 0x40b5c4
lea ecx, [esp + 0x550]
push ecx
call sub.KERNEL32.DLL_SetCurrentDirectoryA
push edi
call sub.KERNEL32.DLL_FreeLibrary
test bl, bl
je 0x40b609
cmp byte [esp + 8], 0
je 0x40b609
push dword [esp]
call fcn.00437da0
pop ecx
test bl, bl
jne 0x40b625
push dword [esp]
mov eax, 0xe50
call fcn.0040dfb0
push eax
push 0
call fcn.004272fc
add esp, 0xc
mov eax, ebx
push eax
lea eax, [esp + 0x160]
mov edx, 2
call fcn.0040b658
pop eax
add esp, 0x950
pop ebp
pop edi
pop esi
pop ebx
ret