Function at 0x405690
Capabilities:
Delete file
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46f09d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x804c
call fcn.00447580
mov eax, dword [0x493790]
push ebx
push esi
mov dword [esp + 0x8050], eax
push edi
mov esi, ecx
mov eax, dword [esi + 0x88]
push ecx
sub eax, 0x10
mov dword [esp + 0x50], esp
mov edi, esp
push eax
call fcn.00401fc0
add eax, 0x10
add esp, 4
mov ecx, 0x4dee80
mov dword [edi], eax
call fcn.0040a8d0
mov ecx, 0x4dee80
call fcn.00408260
call fcn.00460104
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea ebx, [eax + 0x10]
mov dword [esp + 0x24], ebx
mov eax, dword [esi + 0x88]
mov edi, dword [sym.imp.kernel32.dll_CreateFileA]
push 0
push 0
push 3
push 0
push 1
push 0x40000000
push eax
mov dword [esp + 0x8080], 0
call edi
push 2
push 0
push 0
push eax
mov dword [esp + 0x1c], eax
call dword [sym.imp.kernel32.dll_SetFilePointer]
mov eax, dword [esi + 0x1c]
push 0
push 0x64
push 0
push eax
call dword [sym.imp.user32.dll_SetTimer]
mov dword [esi + 0x4b3c], eax
mov ecx, dword [0x4df048]
push 0x473a35
push ecx
call fcn.00447da8
add esp, 8
test eax, eax
je 0x4057ad
mov edx, dword [0x4df048]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push edx
call edi
cmp eax, 0xffffffff
mov dword [esp + 0x40], eax
jne 0x4057ad
push 0
push 0
push 0x47441c
mov ecx, esi
call fcn.0045c8e3
lea eax, [ebx - 0x10]
jmp 0x405fd1
mov eax, dword [esi + 0x4b5c]
mov ebx, dword [sym.imp.user32.dll_SendMessageA]
push 0x640000
push 0
push 0x401
push eax
call ebx
mov ecx, dword [esi + 0x4b5c]
mov eax, 0x51eb851f
mul dword [0x4dee9c]
xor edi, edi
push edi
push edi
shr edx, 5
push 0x402
push ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x20], edi
mov dword [esp + 0x4c], edi
call ebx
call fcn.00460104
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x4c], eax
mov byte [esp + 0x8064], 1
call fcn.00460104
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x4b5c]
push edi
push edi
push 0x402
push eax
mov byte [esp + 0x8074], 2
call ebx
cmp dword [0x4e3afc], 2
jne 0x405879
mov eax, dword [0x4df048]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x34], esp
mov edi, esp
push eax
call fcn.00401fc0
add eax, 0x10
add esp, 4
lea ecx, [esi + 0x90]
mov dword [edi], eax
call fcn.004038a0
mov dword [esi + 0x94], 0
cmp dword [0x4e3afc], 1
jne 0x4058b4
mov eax, dword [0x4df048]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x34], esp
mov edi, esp
push eax
call fcn.00401fc0
add eax, 0x10
add esp, 4
lea ecx, [esi + 0xf0]
mov dword [edi], eax
call fcn.0040c6a0
mov dword [esi + 0x4b28], 0
mov eax, dword [0x4dee70]
test eax, eax
mov dword [esp + 0x34], 0
jle 0x405d77
mov ebx, 0x4ae128
mov dword [esp + 0x14], ebx
mov eax, dword [ebx]
cmp dword [eax + 0x28], 0xffffffff
jne 0x405d4f
mov ecx, dword [eax + 0xc]
push ecx
mov ecx, 0x4dee80
call fcn.004037d0
mov ecx, eax
and ecx, 0x80000001
jns 0x4058fb
dec ecx
or ecx, 0xfffffffe
inc ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x34]
mov edi, eax
push edx
lea eax, [esp + 0x34]
mov dword [esp + 0x24], ecx
sar edi, 1
push eax
mov ecx, 0x4dee80
mov dword [esp + 0x4c], edi
call fcn.00406ee0
mov eax, dword [eax]
push eax
push 0x40c
mov ecx, esi
mov byte [esp + 0x806c], 3
call fcn.0045f379
mov ecx, eax
call fcn.0045f49d
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov byte [esp + 0x8064], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405962
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [ebx]
add eax, 0x14
mov eax, dword [eax]
push 0x473a35
push eax
call fcn.00447da8
add esp, 8
test eax, eax
push 0
push 0
je 0x4059a5
mov eax, dword [ebx]
mov eax, dword [eax + 0x14]
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.kernel32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x406014
mov dword [esp + 0x28], eax
jmp 0x4059c0
mov ecx, dword [ebx]
mov edx, dword [ecx + 8]
mov eax, dword [esp + 0x48]
shl edx, 0xb
push edx
push eax
mov dword [esp + 0x38], eax
call dword [sym.imp.kernel32.dll_SetFilePointer]
lea ecx, [ecx]
mov eax, dword [esp + 0xc]
push 1
push 0
push 0
push eax
call dword [sym.imp.kernel32.dll_SetFilePointer]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
mov ebx, eax
mov eax, dword [edx + 4]
shr ebx, 0xb
cmp ebx, eax
je 0x405a15
ja 0x406058
mov edx, dword [esp + 0xc]
xor eax, eax
push eax
mov ecx, 0x2000
lea edi, [esp + 0x54]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
push eax
push 0x800
lea ecx, [esp + 0x5c]
push ecx
push edx
call dword [sym.imp.kernel32.dll_WriteFile]
mov edi, dword [esp + 0x44]
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
cmp ebx, dword [ecx + 4]
jne 0x4059c0
mov edx, dword [esp + 0x14]
mov eax, dword [edx]
mov cl, byte [eax + 0x2e]
test cl, cl
je 0x405b46
mov ebx, dword [esp + 0x44]
xor eax, eax
test ebx, ebx
mov ecx, 0x2000
lea edi, [esp + 0x50]
rep stosd dword es:[edi], eax
mov dword [esp + 0x48], eax
jle 0x405af2
mov edi, edi
mov al, byte [esi + 0x75]
test al, al
jne 0x405e05
mov edx, dword [esp + 0xc]
push 0
lea eax, [esp + 0x1c]
push eax
push 0x1000
lea ecx, [esp + 0x5c]
push ecx
push edx
call dword [sym.imp.kernel32.dll_WriteFile]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
add eax, 2
cmp eax, ecx
mov dword [esp + 0x10], eax
jbe 0x405ae1
mov edi, dword [esp + 0x3c]
mov eax, dword [esi + 0x4b5c]
push 0
inc edi
push edi
push 0x402
push eax
mov dword [esp + 0x4c], edi
call dword [sym.imp.user32.dll_SendMessageA]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x38]
push edi
lea eax, [esp + 0x30]
add ecx, edx
push 0x473f00
push eax
mov dword [esp + 0x28], ecx
call fcn.00402a00
mov ecx, dword [esp + 0x38]
add esp, 0xc
push ecx
push 0x40d
mov ecx, esi
call fcn.0045f379
mov ecx, eax
call fcn.0045f49d
mov eax, dword [esp + 0x48]
inc eax
cmp eax, ebx
mov dword [esp + 0x48], eax
jl 0x405a50
mov eax, dword [esp + 0x20]
test eax, eax
jle 0x405b1b
mov ecx, dword [esp + 0xc]
push 0
lea edx, [esp + 0x1c]
push edx
push 0x800
lea eax, [esp + 0x5c]
push eax
push ecx
call dword [sym.imp.kernel32.dll_WriteFile]
add dword [esp + 0x10], 2
mov edx, dword [esp + 0x14]
mov eax, dword [edx]
add eax, 0x14
mov eax, dword [eax]
push 0x473a35
push eax
call fcn.00447da8
add esp, 8
test eax, eax
je 0x405d4f
mov eax, dword [esp + 0x28]
push eax
jmp 0x405d49
mov ecx, dword [0x4e3afc]
cmp ecx, 2
jne 0x405ba8
mov edx, dword [esp + 0x38]
lea ecx, [esp + 0x10]
push ecx
push edx
lea ecx, [esp + 0x24]
push ecx
lea edx, [esi + 0x4b90]
push edx
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 8]
lea ecx, [esi + 0x4b40]
push ecx
push edx
push eax
mov eax, dword [0x4df048]
lea ecx, [esp + 0x28]
push ecx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x44], esp
mov ebx, esp
push eax
call fcn.00401fc0
add eax, 0x10
add esp, 4
lea ecx, [esi + 0x90]
mov dword [ebx], eax
call fcn.004049e0
jmp 0x405d4f
cmp ecx, 1
jne 0x405c04
mov ecx, dword [esp + 0x38]
lea edx, [esp + 0x10]
push edx
push ecx
lea edx, [esp + 0x24]
push edx
lea ecx, [esi + 0x4b90]
push ecx
mov ecx, dword [eax + 0x10]
lea edx, [esi + 0x4b40]
push edx
mov edx, dword [eax + 8]
push ecx
push edx
lea eax, [esp + 0x28]
push eax
mov eax, dword [0x4df048]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x44], esp
mov ebx, esp
push eax
call fcn.00401fc0
add eax, 0x10
add esp, 4
lea ecx, [esi + 0xf0]
mov dword [ebx], eax
call fcn.0040d220
jmp 0x405d4f
xor ebx, ebx
test edi, edi
jle 0x405cd6
mov edi, edi
mov al, byte [esi + 0x75]
test al, al
jne 0x405e05
xor eax, eax
push eax
mov ecx, 0x2000
lea edi, [esp + 0x54]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x1c]
push ecx
push 0x1000
lea edx, [esp + 0x5c]
push edx
push eax
call dword [sym.imp.kernel32.dll_ReadFile]
mov eax, dword [esp + 0xc]
push 0
lea ecx, [esp + 0x1c]
push ecx
push 0x1000
lea edx, [esp + 0x5c]
push edx
push eax
call dword [sym.imp.kernel32.dll_WriteFile]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
add eax, 2
cmp eax, ecx
mov dword [esp + 0x10], eax
jbe 0x405cc9
mov edi, dword [esp + 0x3c]
mov ecx, dword [esi + 0x4b5c]
push 0
inc edi
push edi
push 0x402
push ecx
mov dword [esp + 0x4c], edi
call dword [sym.imp.user32.dll_SendMessageA]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x38]
push edi
lea ecx, [esp + 0x30]
add edx, eax
push 0x473f00
push ecx
mov dword [esp + 0x28], edx
call fcn.00402a00
mov edx, dword [esp + 0x38]
add esp, 0xc
push edx
push 0x40d
mov ecx, esi
call fcn.0045f379
mov ecx, eax
call fcn.0045f49d
mov eax, dword [esp + 0x44]
inc ebx
cmp ebx, eax
jl 0x405c10
mov eax, dword [esp + 0x20]
test eax, eax
jle 0x405d27
mov edx, dword [esp + 0x28]
xor eax, eax
push eax
mov ecx, 0x2000
lea edi, [esp + 0x54]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
push eax
push 0x800
lea ecx, [esp + 0x5c]
push ecx
push edx
call dword [sym.imp.kernel32.dll_ReadFile]
mov edx, dword [esp + 0xc]
push 0
lea eax, [esp + 0x1c]
push eax
push 0x800
lea ecx, [esp + 0x5c]
push ecx
push edx
call dword [sym.imp.kernel32.dll_WriteFile]
add dword [esp + 0x10], 2
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
add eax, 0x14
mov eax, dword [eax]
push 0x473a35
push eax
call fcn.00447da8
add esp, 8
test eax, eax
je 0x405d4f
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [esp + 0x34]
mov ebx, dword [esp + 0x14]
mov ecx, dword [0x4dee70]
inc eax
add ebx, 4
cmp eax, ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x14], ebx
jl 0x4058d2
mov ebx, dword [sym.imp.user32.dll_SendMessageA]
mov ecx, dword [esp + 0xc]
push 1
push 0
push 0
push ecx
call dword [sym.imp.kernel32.dll_SetFilePointer]
mov ecx, dword [0x4dee9c]
shr eax, 0xb
cmp eax, ecx
jae 0x405ddb
xor eax, eax
push eax
lea edx, [esp + 0x1c]
push edx
mov ecx, 0x2000
lea edi, [esp + 0x58]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x14]
push 0x800
lea eax, [esp + 0x5c]
push eax
push ecx
call dword [sym.imp.kernel32.dll_WriteFile]
mov edx, dword [esp + 0xc]
push 1
push 0
push 0
push edx
call dword [sym.imp.kernel32.dll_SetFilePointer]
mov ecx, dword [0x4dee9c]
shr eax, 0xb
cmp eax, ecx
jb 0x405d95
mov eax, dword [esi + 0x4b5c]
push 0
push 0x65
push 0x402
push eax
call ebx
push 0x474414
push 0x40d
mov ecx, esi
call fcn.0045f379
mov ecx, eax
call fcn.0045f49d
call fcn.00450cf0
mov eax, dword [esp + 0xc]
test eax, eax
je 0x405e19
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov al, byte [esi + 0x75]
test al, al
jne 0x405f7a
push 0x474378
push 0x40b
mov ecx, esi
call fcn.0045f379
mov ecx, eax
call fcn.0045f49d
push 0x474368
push 0x40c
mov ecx, esi
call fcn.0045f379
mov ecx, eax
call fcn.0045f49d
mov al, byte [esi + 0x76]
test al, al
mov ebx, dword [sym.imp.kernel32.dll_DeleteFileA]
je 0x405eda
mov eax, dword [esi + 0x8c]
lea ecx, [esi + 0x4b90]
push ecx
lea edx, [esi + 0x4b40]
push edx
push ecx
sub eax, 0x10
mov dword [esp + 0x3c], esp
mov edi, esp
push eax
mov byte [esi + 0x78], 1
call fcn.00401fc0
add eax, 0x10
mov dword [edi], eax
mov eax, dword [esi + 0x88]
sub eax, 0x10
mov dword [esp + 0x30], esp
mov edi, esp
push eax
mov byte [esp + 0x8078], 5
call fcn.00401fc0
add eax, 0x10
mov dword [edi], eax
mov eax, dword [esi + 0x80]
add esp, 4
push eax
lea ecx, [esi + 0x90]
mov byte [esp + 0x8078], 2
call fcn.00404370
mov eax, dword [esi + 0x88]
push eax
call ebx
mov al, byte [esi + 0x77]
test al, al
je 0x405f7a
mov ecx, dword [esi + 0x84]
push ecx
xor edx, edx
mov dl, byte [esi + 0x7b]
xor eax, eax
mov al, byte [esi + 0x7a]
xor ecx, ecx
mov cl, byte [esi + 0x79]
mov byte [esi + 0x78], 1
push edx
lea edx, [esi + 0x4c30]
push eax
lea eax, [esi + 0x4b90]
push ecx
push edx
push eax
mov eax, dword [esi + 0x8c]
lea ecx, [esi + 0x4b40]
push ecx
push ecx
sub eax, 0x10
mov dword [esp + 0x50], esp
mov edi, esp
push eax
call fcn.00401fc0
add eax, 0x10
mov dword [edi], eax
mov eax, dword [esi + 0x88]
sub eax, 0x10
mov dword [esp + 0x44], esp
mov edi, esp
push eax
mov byte [esp + 0x808c], 6
call fcn.00401fc0
add eax, 0x10
mov dword [edi], eax
mov edx, dword [esi + 0x80]
add esp, 4
push edx
lea ecx, [esi + 0xf0]
mov byte [esp + 0x808c], 2
call fcn.0040e060
mov eax, dword [esi + 0x88]
push eax
call ebx
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esi + 0x74], 1
mov byte [esp + 0x8064], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405fa4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
mov byte [esp + 0x8064], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405fca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov dword [esp + 0x8064], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405ff3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x805c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x8054]
call fcn.004475ee
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x34]
mov eax, dword [edx*4 + 0x4ae128]
mov ecx, dword [eax + 0x14]
push ecx
lea edx, [esp + 0x28]
push 0x4743f0
push edx
call fcn.00402a00
mov eax, dword [esp + 0x30]
add esp, 0xc
push 0x10
push 0x4743e0
push eax
mov ecx, esi
call fcn.0045c8e3
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x405e05
mov edi, dword [esp + 0x34]
push edi
lea edx, [esp + 0x44]
push edx
mov ecx, 0x4dee80
call fcn.00406ee0
mov ecx, dword [edi*4 + 0x4ae128]
mov edx, dword [ecx + 4]
mov eax, dword [eax]
push edx
push eax
push ebx
lea ecx, [esp + 0x30]
push 0x474398
push ecx
mov byte [esp + 0x8078], 4
call fcn.00402a00
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
add esp, 0x14
mov byte [esp + 0x8064], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4060bb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x24]
push 0x10
push 0x47438c
push eax
mov ecx, esi
call fcn.0045c8e3
mov byte [esi + 0x75], 1
jmp 0x405e05