Function at 0x403c00
Capabilities:
Delete file
Move file
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40a358
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x18], ebx
mov edi, str.Mrak1pack
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x40]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x60], 1
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x28]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov dword [esp + 0x10], ebx
rep movsb byte es:[edi], byte [esi]
mov edi, str.Mrak1pack
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [0x40d794]
and ecx, 3
mov dword [esp + 0x1c], eax
inc eax
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.004052bd
mov edi, dword [0x40d790]
mov ebp, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x403cc4
push eax
call fcn.004052b2
add esp, 4
push str._tmp.exe
lea ecx, [esp + 0x24]
mov dword [esp + 0x1c], ebp
call fcn.004021d0
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x64], 2
call fcn.004023f0
lea ecx, [esp + 0x20]
mov esi, eax
mov byte [esp + 0x60], 1
call fcn.00402490
push esi
lea ecx, [esp + 0x1c]
call fcn.00402300
lea ecx, [esp + 0x68]
call fcn.00402480
mov esi, eax
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
sub esp, 8
repne scasb al, byte es:[edi]
not ecx
mov ebp, esp
dec ecx
mov dword [esp + 0x1c], esp
mov dword [ebp + 4], ecx
inc ecx
push ecx
call fcn.004052bd
mov edx, eax
mov edi, esi
mov dword [ebp], edx
or ebp, 0xffffffff
mov ecx, ebp
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00404120
add esp, 8
test al, al
je 0x403d8d
mov eax, dword [esp + 0x18]
mov byte [esp + 0x60], 0
cmp eax, ebx
je 0x403d74
push eax
call fcn.004052b2
add esp, 4
mov eax, dword [esp + 0x68]
mov dword [esp + 0x18], ebx
cmp eax, ebx
mov dword [esp + 0x60], ebp
je 0x4040fd
jmp 0x4040f4
push 0x40d7a0
call fcn.0040196a
mov esi, eax
add esp, 4
cmp esi, ebx
jne 0x403dc9
mov eax, dword [esp + 0x18]
mov byte [esp + 0x60], 0
cmp eax, ebx
je 0x403db6
push eax
call fcn.004052b2
add esp, 4
mov eax, dword [esp + 0x68]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x60], ebp
cmp eax, ebx
jmp 0x4040b3
push 2
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0xffffffffffffffe8
push esi
call ebx
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x30]
push 0x18
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, str.Control
lea eax, [esp + 0x28]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [edi]
jne 0x403e19
test cl, cl
je 0x403e15
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [edi + 1]
jne 0x403e19
add eax, 2
add edi, 2
test cl, cl
jne 0x403df5
xor eax, eax
jmp 0x403e1e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x403e5a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
mov byte [esp + 0x60], 0
test eax, eax
je 0x403e3f
push eax
call fcn.004052b2
add esp, 4
mov eax, dword [esp + 0x68]
mov dword [esp + 0x18], 0
mov dword [esp + 0x60], 0xffffffff
test eax, eax
jmp 0x4040b3
push 0
push 0
push 0
push esi
call ebx
mov eax, dword [esp + 0x38]
push eax
call fcn.004052bd
mov edx, dword [esp + 0x3c]
add esp, 4
lea ecx, [esp + 0x10]
mov edi, eax
push 0
push ecx
push edx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call ebp
lea eax, [esp + 0x18]
push eax
call fcn.00401931
mov esi, eax
add esp, 4
test esi, esi
je 0x403e29
mov edx, dword [esp + 0x38]
lea ecx, [esp + 0x10]
push 0
push ecx
push edx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call ebp
push edi
call fcn.004052b2
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x6c]
push 1
push eax
push ecx
call fcn.00401d82
add esp, 0x10
test al, al
je 0x403e29
push 0x40d7a0
call fcn.0040196a
mov esi, eax
add esp, 4
test esi, esi
je 0x403e29
mov edx, dword [esp + 0x38]
push 0
push 0
push edx
push esi
call ebx
mov eax, dword [esp + 0x3c]
push eax
call fcn.004052bd
mov edx, dword [esp + 0x40]
add esp, 4
lea ecx, [esp + 0x10]
mov edi, eax
push 0
push ecx
push edx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call ebp
lea eax, [esp + 0x18]
push eax
call fcn.004019a3
mov esi, eax
add esp, 4
test esi, esi
je 0x403e29
push 2
push 0
push 0
push esi
call ebx
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x10]
push 0
push ecx
push edx
push edi
push esi
mov dword [esp + 0x4c], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x30]
push 0x18
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call ebp
push edi
call fcn.004052b2
lea edx, [esp + 0x6c]
push edx
call fcn.0040196a
mov esi, eax
add esp, 8
test esi, esi
je 0x403e29
push 2
push 0
push 0
push esi
call ebx
push 0
push 0
push 0
push esi
mov edi, eax
call ebx
push edi
mov dword [esp + 0x58], edi
call fcn.004052bd
add esp, 4
mov ebx, eax
lea eax, [esp + 0x10]
push 0
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
push esi
cmp edi, eax
je 0x403fdd
call ebp
push ebx
call fcn.004052b2
add esp, 4
jmp 0x403e29
call ebp
lea ecx, [esp + 0x18]
push ecx
call fcn.004019a3
mov esi, eax
add esp, 4
test esi, esi
jne 0x404000
push ebx
call fcn.004052b2
add esp, 4
jmp 0x403e29
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [esp + 0x10]
push 0
push edx
push edi
push ebx
push esi
mov dword [esp + 0x64], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp edi, dword [esp + 0x10]
je 0x404038
push esi
call ebp
push ebx
call fcn.004052b2
add esp, 4
jmp 0x403e29
xor edi, edi
lea eax, [esp + 0x10]
push edi
push eax
lea ecx, [esp + 0x48]
push 0x18
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call ebp
push ebx
call fcn.004052b2
mov edx, dword [esp + 0x6c]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x404077
mov byte [esp + 0x60], al
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x4040a1
jmp 0x404098
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
mov eax, dword [esp + 0x18]
mov byte [esp + 0x60], 0
jne 0x4040d3
cmp eax, edi
je 0x4040a1
push eax
call fcn.004052b2
add esp, 4
mov eax, dword [esp + 0x68]
mov dword [esp + 0x18], edi
mov dword [esp + 0x60], 0xffffffff
cmp eax, edi
je 0x4040be
push eax
call fcn.004052b2
add esp, 4
xor al, al
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
cmp eax, edi
je 0x4040e0
push eax
call fcn.004052b2
add esp, 4
mov eax, dword [esp + 0x68]
mov dword [esp + 0x18], edi
cmp eax, edi
mov dword [esp + 0x60], 0xffffffff
je 0x4040fd
push eax
call fcn.004052b2
add esp, 4
mov ecx, dword [esp + 0x58]
pop edi
pop esi
pop ebp
mov al, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x54
ret