Function at 0x403740
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41fa00
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x42e7a0]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ebx, ebx
cmp dword [esi + 0x1108], eax
je 0x403799
mov dword [esi + 0x10e4], 0x3f3
mov dword [esi + 0x10e8], ebx
mov dword [esi + 0x10ec], ebx
jmp 0x403afe
cmp dword [esi + 0x10f0], ebx
je 0x403afe
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x1104], eax
mov dword [esi + 0x10f4], ebx
mov ecx, dword [esi + 0xc]
mov dword [esi + 8], ebx
xor edx, edx
mov word [ecx], dx
mov eax, dword [esi + 0x14]
mov edx, dword [ebp + 0xc]
lea edi, [esi + 0x10cc]
xor ecx, ecx
mov word [eax], cx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [edi + 0x18], ebx
mov dword [edi + 0x1c], ebx
mov dword [edi + 0x20], ebx
mov dword [edi], ebx
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
lea ecx, [esi + 0x58]
push edx
mov dword [esp + 0x1c], edi
mov dword [esi + 0x4c], ebx
call fcn.004012b0
lea eax, [esi + 0x58]
push eax
call fcn.00401650
mov eax, dword [esi + 0x58]
push 0x4229fc
push eax
call dword [sym.imp.MSVCR90.dll__wcsicmp]
add esp, 0xc
neg eax
sbb eax, eax
inc eax
push 0x12c
lea ecx, [esp + 0x38]
mov dword [esi + 0x10f8], eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
call fcn.004011a0
mov edx, dword [esp + 0x34]
xor ecx, ecx
mov word [edx], cx
push 0x12c
lea ecx, [esp + 0x30]
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call fcn.004011a0
mov ecx, dword [esp + 0x2c]
xor eax, eax
mov word [ecx], ax
mov ecx, dword [ebp + 8]
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x38]
push eax
push ecx
mov byte [esp + 0x54], 1
call fcn.004016f0
mov eax, dword [esi + 0x58]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x403883
sub eax, edx
sar eax, 1
cmp eax, dword [esi + 0x5c]
jb 0x4038ae
push 0x429248
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], str.The_string_has_no_terminating_null_character_
call sub.MSVCR90.dll__CxxThrowException
cmp eax, 3
jb 0x403ada
lea ecx, [esp + 0x34]
call fcn.00401160
cmp eax, 2
jb 0x403ada
lea ecx, [esp + 0x2c]
call fcn.00401160
cmp eax, 2
jb 0x403ada
mov eax, dword [esi + 0x60]
lea edi, [esi + 0x60]
xor ecx, ecx
mov word [eax], cx
push 0x12c
lea ecx, [esp + 0x28]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call fcn.00401040
mov edx, dword [esp + 0x24]
mov byte [edx], bl
push 0x12c
lea ecx, [esp + 0x20]
mov byte [esp + 0x4c], 2
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call fcn.00401040
mov eax, dword [esp + 0x1c]
mov byte [eax], bl
mov ecx, dword [ebp + 0x10]
mov edx, dword [esp + 0x34]
push ecx
push ebx
push 0x4034b0
push ebx
push edx
lea ecx, [esp + 0x30]
mov byte [esp + 0x5c], 3
call fcn.004010d0
push eax
mov eax, dword [esp + 0x40]
push eax
lea ecx, [esp + 0x3c]
call fcn.004010d0
mov ecx, dword [esi + 0x10f0]
mov edx, dword [esi + 0x1114]
push eax
push ecx
call edx
add esp, 0x1c
test eax, eax
je 0x403a47
jmp 0x403970
mov eax, dword [edi]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x403975
sub eax, edx
sar eax, 1
cmp eax, dword [edi + 4]
jae 0x403ac3
cmp eax, ebx
je 0x403a47
push edi
lea ecx, [esp + 0x30]
call fcn.004012b0
mov eax, dword [esp + 0x1c]
push eax
call sub.mfc90u.dll_delete__
mov ecx, dword [esp + 0x28]
push ecx
mov byte [esp + 0x50], 1
call sub.mfc90u.dll_delete__
mov edx, dword [edi]
add esp, 8
xor eax, eax
push 0x12c
lea ecx, [esp + 0x28]
mov word [edx], ax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call fcn.00401040
mov ecx, dword [esp + 0x24]
mov byte [ecx], bl
push 0x12c
lea ecx, [esp + 0x20]
mov byte [esp + 0x4c], 2
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call fcn.00401040
mov edx, dword [esp + 0x1c]
mov byte [edx], bl
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x34]
push eax
push ebx
push 0x4034b0
push ebx
push ecx
lea ecx, [esp + 0x30]
mov byte [esp + 0x5c], 3
call fcn.004010d0
mov edx, dword [esp + 0x3c]
push eax
push edx
lea ecx, [esp + 0x3c]
call fcn.004010d0
mov ecx, dword [esi + 0x1114]
push eax
mov eax, dword [esi + 0x10f0]
push eax
call ecx
add esp, 0x1c
test eax, eax
jne 0x403970
mov edx, dword [esp + 0x1c]
push edx
call sub.mfc90u.dll_delete__
mov eax, dword [esp + 0x28]
push eax
mov byte [esp + 0x50], 1
call sub.mfc90u.dll_delete__
mov ecx, dword [esi + 8]
add esp, 8
push ecx
mov ecx, esi
call fcn.00402ab0
cmp dword [esi + 0x10f4], ebx
je 0x403a85
cmp dword [esi + 8], ebx
je 0x403a85
mov edx, dword [esi + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [esp + 0x18]
call fcn.004017b0
mov esi, eax
mov eax, dword [esp + 0x2c]
neg esi
sbb esi, esi
push eax
inc esi
call sub.mfc90u.dll_delete__
mov ecx, dword [esp + 0x38]
push ecx
call sub.mfc90u.dll_delete__
add esp, 8
mov eax, esi
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0x429248
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], str.The_string_has_no_terminating_null_character_
call sub.MSVCR90.dll__CxxThrowException
mov edx, dword [esp + 0x2c]
push edx
mov dword [edi + 0x18], 0x3ea
mov dword [edi + 0x1c], ebx
mov dword [edi + 0x20], ebx
call sub.mfc90u.dll_delete__
mov eax, dword [esp + 0x38]
push eax
call sub.mfc90u.dll_delete__
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc