Function at 0x401040
Capabilities:
Create thread
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x264
mov eax, dword [0x4b3008]
xor eax, esp
mov dword [esp + 0x260], eax
mov eax, dword [ebp + 0x10]
lea ecx, [ebp + 0x14]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0x7c1d04
push 0x4b46ec
push 0x7c1d40
push ecx
push 0x7c1d48
push 0x7c1d3c
push str._d__s__d__d__d__d
push eax
mov byte [0x7c1d48], 0
mov dword [ebp + 0x14], 0
mov dword [0x7c1d40], 0
mov dword [0x4b46ec], 0
mov dword [0x7c1d04], 0
call fcn.00404470
add esp, 0x20
cmp dword [0x7c1d04], 1
jne 0x4010db
movsd xmm0, qword [0x4aeef0]
movsd qword [0x4b3980], xmm0
movsd qword [0x4b3978], xmm0
mov eax, dword [ebp + 0x14]
mov dword [0x4b3920], eax
cmp eax, 0xa
jne 0x4010f2
mov dword [0x4b3920], 1
cmp eax, 2
jne 0x401100
mov dword [ebp + 0x14], 0
jmp 0x40110c
cmp eax, 3
jne 0x40110c
mov dword [ebp + 0x14], 2
mov ecx, 0x7c1d48
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401114
xor eax, eax
sub ecx, edx
js 0x401136
cmp byte [eax + 0x7c1d48], 0x2a
jne 0x401131
mov byte [eax + 0x7c1d48], 0x20
inc eax
cmp eax, ecx
jle 0x401121
push 0
push 0x4b4180
push 0x158
push 0x29
mov dword [0x4b4180], 0x158
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
cmp dword [0x7c1d3c], 0x64
jle 0x401170
cmp dword [0x7c1d38], 0
jne 0x401170
mov dword [0x7c1d38], 1
mov eax, dword [0x4a2318]
mov dword [esp + 0x60], eax
mov ax, word [0x4a231c]
mov word [esp + 0x64], ax
movzx eax, byte [0x4a231e]
mov byte [esp + 0x66], al
mov al, byte [esp + 0x60]
mov dword [0x4b4138], 0x3a203030
mov dword [0x4b413c], 0x303020
mov byte [0x4b4370], al
test al, al
je 0x4011c3
xor ecx, ecx
lea ecx, [ecx + 1]
mov al, byte [esp + ecx + 0x60]
mov byte [ecx + 0x4b4370], al
test al, al
jne 0x4011b2
push 0x64
push 0x4b4308
push 0x6d
push edi
call dword [sym.imp.USER32.dll_LoadStringA]
mov esi, dword [sym.imp.USER32.dll_LoadIconA]
push 0x83
push edi
mov dword [esp + 0x1c], 0x30
mov dword [esp + 0x20], 3
mov dword [esp + 0x24], 0x403740
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], edi
call esi
push 0x7f00
push 0
mov dword [esp + 0x34], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
push 0x83
push dword [esp + 0x2c]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], 6
mov dword [esp + 0x40], 0x6d
mov dword [esp + 0x44], 0x4b4308
call esi
mov dword [esp + 0x40], eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExA]
mov edx, dword [ebp + 0x14]
mov ecx, edi
call fcn.004013b0
test eax, eax
jne 0x401279
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x260]
xor ecx, esp
call fcn.004a034d
mov esp, ebp
pop ebp
ret 0x10
push 0x7c1d48
lea eax, [esp + 0x6c]
push str._sError.dat
push eax
call fcn.00404440
add esp, 0xc
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
mov eax, dword [0x4b46ec]
add esp, 4
test eax, eax
jne 0x4012ae
push str.CalcForceClose
jmp 0x4012cc
push eax
lea eax, [esp + 0x16c]
push str.CalcForceClose._d
push eax
call fcn.00404440
add esp, 0xc
lea eax, [esp + 0x168]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push eax
mov dword [0x4b417c], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
lea eax, [esp + 0x10]
push eax
push 0
push 0
push section..text
push 0
push 0
call esi
mov dword [0x4b42f4], eax
lea eax, [esp + 0x10]
push eax
push 0
push dword [0x4b4300]
push 0x49d170
push 0
push 0
call esi
push 0x6d
push edi
mov dword [0x4b42f8], eax
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
push 0
push 0
mov dword [esp + 0x68], eax
lea eax, [esp + 0x4c]
push 0
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x40138a
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorA]
mov esi, dword [sym.imp.USER32.dll_TranslateMessage]
mov edi, dword [sym.imp.USER32.dll_DispatchMessageA]
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x64]
push dword [esp + 0x4c]
call ebx
test eax, eax
jne 0x401375
lea eax, [esp + 0x44]
push eax
call esi
lea eax, [esp + 0x44]
push eax
call edi
push 0
push 0
push 0
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
jne 0x401354
mov ecx, dword [esp + 0x26c]
mov eax, dword [esp + 0x4c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004a034d
mov esp, ebp
pop ebp
ret 0x10