Function at 0x40d840
Capabilities:
Delete file
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42e0d9
mov eax, dword fs:[0]
push eax
sub esp, 0x1f8
mov eax, dword [0x43e028]
xor eax, esp
mov dword [esp + 0x1f0], eax
push ebx
push esi
push edi
mov eax, dword [0x43e028]
xor eax, esp
push eax
lea eax, [esp + 0x208]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0x18], 8
lea edi, [esi + 4]
mov dword [esp + 0x14], esi
mov dword [edi + 0x10], 0
jb 0x40d89a
mov eax, dword [edi]
jmp 0x40d89c
mov eax, edi
xor ecx, ecx
mov ebx, esi
mov word [eax], cx
call fcn.0040c860
cmp eax, 1
jne 0x40de96
lea edx, [esp + 0xc0]
push edx
call fcn.0040ded0
xor ebx, ebx
mov dword [esp + 0x210], ebx
mov eax, 7
xor ecx, ecx
mov dword [esp + 0x64], eax
mov dword [esp + 0x60], ebx
mov word [esp + 0x50], cx
xor edx, edx
mov dword [esp + 0x80], eax
mov dword [esp + 0x7c], ebx
mov word [esp + 0x6c], dx
mov byte [esp + 0x210], 2
mov eax, dword [esi + 0x94]
cmp eax, ebx
je 0x40d91b
lea ecx, [esp + 0x6c]
push ecx
push eax
call fcn.0040b730
push ebx
lea edx, [esp + 0x78]
lea ecx, [esp + 0x5c]
call fcn.0040bb50
add esp, 0xc
cmp dword [esp + 0xd0], ebx
je 0x40dd78
push ebx
lea edx, [esp + 0xc4]
push edx
or eax, 0xffffffff
mov ecx, edi
call fcn.004011f0
mov eax, dword [esi + 0x14]
dec eax
cmp dword [edi + 0x10], eax
ja 0x40d94f
push str.invalid_string_position
call dword [sym.imp.MSVCP100.dll_void___cdecl_std::_Xout_of_range_char_const__]
cmp dword [edi + 0x14], 8
jb 0x40d959
mov ecx, dword [edi]
jmp 0x40d95b
mov ecx, edi
cmp word [ecx + eax*2], 0x5c
je 0x40d970
push 1
mov eax, 0x432b50
mov ecx, edi
call fcn.0040b480
cmp dword [esi + 0x48], ebx
je 0x40da16
cmp dword [esi + 0x94], ebx
je 0x40da16
cmp dword [esi + 0x5c], ebx
je 0x40d9cd
lea eax, [esp + 0x88]
lea ebx, [esi + 0x4c]
push eax
call fcn.004103e0
add esp, 4
push 0
push eax
or eax, 0xffffffff
mov esi, edi
mov byte [esp + 0x218], 3
call fcn.0040b630
lea esi, [esp + 0x88]
mov byte [esp + 0x210], 2
call fcn.004016b0
mov ecx, edi
call fcn.0040bd00
push str..log
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x90]
push edx
call fcn.0040c170
add esp, 0xc
push 0
push eax
or eax, 0xffffffff
mov esi, edi
mov byte [esp + 0x218], 4
call fcn.0040b630
lea esi, [esp + 0x88]
mov byte [esp + 0x210], 2
call fcn.004016b0
mov esi, dword [esp + 0x14]
jmp 0x40da24
push 0xe
mov eax, 0x4328d4
mov ecx, edi
call fcn.0040b480
cmp dword [esi + 0x78], 0
je 0x40dd78
cmp dword [esi + 0x94], 0
je 0x40dd78
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x50]
cmp edx, 8
jb 0x40da4e
mov dword [esp + 0x18], eax
jmp 0x40da56
lea ecx, [esp + 0x50]
mov dword [esp + 0x18], ecx
mov ecx, eax
cmp edx, 8
jae 0x40da61
lea ecx, [esp + 0x50]
mov ebx, dword [esp + 0x60]
lea ebx, [ecx + ebx*2]
cmp edx, 8
jae 0x40da71
lea eax, [esp + 0x50]
cmp eax, ebx
je 0x40da8e
mov edx, dword [sym.imp.MSVCR100.dll_tolower]
mov ecx, dword [esp + 0x18]
push edx
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.004114d0
add esp, 0xc
cmp dword [esi + 0x48], 0
je 0x40da9a
cmp dword [esi + 0x5c], 0
jne 0x40dab4
mov esi, str.es2controller
lea ecx, [esp + 0x50]
call fcn.00410490
mov esi, dword [esp + 0x14]
test al, al
je 0x40dd78
xor eax, eax
mov dword [esp + 0x9c], 7
mov dword [esp + 0x98], 0
mov word [esp + 0x88], ax
lea ecx, [esp + 0xa4]
push edi
lea ebx, [esi + 0x4c]
push ecx
mov byte [esp + 0x218], 5
call fcn.004100d0
add esp, 8
mov edx, eax
lea ecx, [esp + 0x88]
mov byte [esp + 0x210], 6
call fcn.0040ba20
lea esi, [esp + 0xa4]
mov edi, eax
mov byte [esp + 0x210], 5
call fcn.004016b0
test edi, edi
je 0x40dc8a
lea edx, [esp + 0x20]
push edx
call fcn.0040eca0
push 1
sub esp, 0x14
mov byte [esp + 0x228], 7
mov esi, esp
mov dword [esp + 0x30], esp
call fcn.004104c0
mov eax, dword [esp + 0x2c]
add eax, 0x68
push eax
lea ecx, [esp + 0x3c]
call fcn.00410510
xor edi, edi
add esp, 0x1c
xor ebx, ebx
cmp dword [esp + 0x30], edi
jbe 0x40dc67
jmp 0x40db72
xor edi, edi
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x34], esp
push edi
lea eax, [esp + 0xa8]
mov esi, 7
xor edx, edx
push eax
mov dword [ecx + 0x14], esi
mov dword [ecx + 0x10], edi
or eax, 0xffffffff
mov word [ecx], dx
call fcn.004011f0
mov eax, ebx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x22c], 8
call fcn.0040ef10
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x54], esp
push edi
xor edx, edx
push eax
mov dword [ecx + 0x14], esi
mov dword [ecx + 0x10], edi
or eax, 0xffffffff
mov word [ecx], dx
call fcn.004011f0
lea eax, [esp + 0xdc]
push eax
mov byte [esp + 0x24c], 7
call fcn.0040ce20
add esp, 0x3c
cmp dword [esp + 0xb4], edi
jbe 0x40dc3f
mov edi, edi
push edi
lea eax, [esp + 0x48]
lea ecx, [esp + 0xa8]
call fcn.00423af0
mov esi, eax
lea eax, [esp + 0x3c]
call fcn.0040fe10
mov ecx, dword [eax]
test ecx, ecx
je 0x40dc14
mov ecx, dword [ecx]
mov eax, dword [eax + 8]
mov edx, dword [ecx + 8]
cmp edx, eax
ja 0x40dc20
sub eax, edx
mov ecx, dword [ecx + 4]
mov eax, dword [ecx + eax*4]
cmp dword [eax + 0x14], 8
jb 0x40dc2e
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
inc edi
cmp edi, dword [esp + 0xb4]
jb 0x40dbf0
lea esi, [esp + 0xa4]
call fcn.0040fba0
mov edx, dword [esp + 0xa4]
push edx
call dword [sym.imp.mfc100u.dll_delete]
inc ebx
add esp, 4
cmp ebx, dword [esp + 0x30]
jb 0x40db70
lea esi, [esp + 0x20]
mov byte [esp + 0x210], 5
call fcn.0040fba0
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.mfc100u.dll_delete]
push eax
call edi
add esp, 4
jmp 0x40dc90
mov edi, dword [sym.imp.mfc100u.dll_delete]
push 0x11c
lea ecx, [esp + 0xe0]
push 0
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
lea edx, [esp + 0xdc]
push edx
mov dword [esp + 0xe0], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [esp + 0xa4]
call fcn.0040d350
mov esi, 8
mov byte [esp + 0x210], 9
cmp dword [eax + 0x14], esi
jb 0x40dce0
mov eax, dword [eax]
movzx ecx, word [esp + 0x1f2]
movzx edx, word [esp + 0x1f0]
push ecx
mov ecx, dword [esp + 0xec]
push edx
mov edx, dword [esp + 0xec]
push ecx
push eax
mov eax, dword [esp + 0xf0]
push edx
push eax
push str.Environment_OSVER:_d._d__s_Build:_d_SP:_d._d
push str...CommonUtilityDbgLog.cpp
push str.CDbgLog::BuildLogName
mov edx, 0x1b4
mov ecx, 5
mov eax, 0x441928
call fcn.0040e050
add esp, 0x24
mov byte [esp + 0x210], 5
cmp dword [esp + 0xb8], esi
jb 0x40dd4f
mov ecx, dword [esp + 0xa4]
push ecx
call edi
add esp, 4
call fcn.0040d400
mov byte [esp + 0x210], 2
cmp dword [esp + 0x9c], esi
jb 0x40dd72
mov edx, dword [esp + 0x88]
push edx
call edi
add esp, 4
mov esi, dword [esp + 0x14]
jmp 0x40dd7e
mov edi, dword [sym.imp.mfc100u.dll_delete]
cmp dword [esp + 0x7c], 0
je 0x40de27
sub esp, 0x1c
mov ecx, esp
xor eax, eax
mov dword [esp + 0x38], esp
push eax
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
lea edx, [esp + 0x8c]
mov word [ecx], ax
push edx
or eax, 0xffffffff
call fcn.004011f0
lea ecx, [esp + 0xa4]
call fcn.0040d220
mov ebx, 8
mov byte [esp + 0x210], 0xa
cmp dword [eax + 0x14], ebx
jb 0x40ddd6
mov eax, dword [eax]
mov ecx, dword [esp + 0x6c]
cmp dword [esp + 0x80], ebx
jae 0x40dde7
lea ecx, [esp + 0x6c]
push eax
push ecx
push str.LoadModule_Path:__s__Ver:__s_
push str...CommonUtilityDbgLog.cpp
push str.CDbgLog::BuildLogName
mov edx, 0x1bf
mov ecx, 5
mov eax, 0x441928
call fcn.0040e050
add esp, 0x14
cmp dword [esp + 0x9c], ebx
jb 0x40de2c
mov eax, dword [esp + 0x88]
push eax
call edi
add esp, 4
jmp 0x40de2c
mov ebx, 8
cmp dword [esp + 0x80], ebx
jb 0x40de3f
mov ecx, dword [esp + 0x6c]
push ecx
call edi
add esp, 4
xor edx, edx
mov dword [esp + 0x80], 7
mov dword [esp + 0x7c], 0
mov word [esp + 0x6c], dx
cmp dword [esp + 0x64], ebx
jb 0x40de69
mov eax, dword [esp + 0x50]
push eax
call edi
add esp, 4
xor ecx, ecx
mov dword [esp + 0x64], 7
mov dword [esp + 0x60], 0
mov word [esp + 0x50], cx
cmp dword [esp + 0xd4], ebx
jb 0x40de96
mov edx, dword [esp + 0xc0]
push edx
call edi
add esp, 4
xor eax, eax
cmp dword [esi + 0x14], eax
setne al
mov ecx, dword [esp + 0x208]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1f0]
xor ecx, esp
call fcn.0042b0b1
mov esp, ebp
pop ebp
ret