Function at 0x40e584
Capabilities:
Delete file
Write file on windows

Disassembly:
push 0x70
push 0x49aae0
call fcn.0047ae60
mov edi, edx
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x74], edi
test edi, edi
je 0x40eb94
test ecx, ecx
je 0x40eb94
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
test esi, esi
je 0x40eb94
mov ecx, dword [esi]
mov dword [ebp - 0x20], ecx
cmp ecx, 0x28
jb 0x40e5e0
mov eax, dword [esi + 0x10]
test eax, eax
je 0x40e5e0
cmp eax, 2
je 0x40e5e0
cmp eax, 1
je 0x40e5e0
cmp eax, 3
jne 0x40eb8d
cmp ecx, 0xc
jne 0x40e5eb
movzx edx, word [esi + 4]
jmp 0x40e5ee
mov edx, dword [esi + 4]
mov dword [ebp - 0x44], edx
jne 0x40e5f9
movzx eax, word [esi + 6]
jmp 0x40e5fc
mov eax, dword [esi + 8]
mov dword [ebp - 0x40], eax
jne 0x40e607
movzx ebx, word [esi + 0xa]
jmp 0x40e60b
movzx ebx, word [esi + 0xe]
mov dword [ebp - 0x54], ebx
mov ecx, esi
call fcn.00410301
mov dword [ebp - 0x6c], eax
push 0x10
pop eax
cmp bx, ax
jae 0x40e652
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, edi
call fcn.0040fac7
mov edi, eax
test edi, edi
je 0x40eb94
mov edx, edi
mov ecx, dword [ebp - 0x68]
call fcn.0040e584
mov esi, eax
mov ecx, edi
call fcn.0040f612
mov eax, esi
jmp 0x40eb96
neg edx
mov eax, dword [ebp - 0x44]
test eax, eax
cmovns edx, eax
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x7c], edx
mov ecx, dword [ebp - 0x40]
mov eax, ecx
shr eax, 0x1f
mov dword [ebp - 0x5c], eax
mov eax, ecx
neg eax
test ecx, ecx
cmovns eax, ecx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x78], eax
movzx eax, bx
mov dword [ebp - 0x58], eax
mov ecx, ebx
and ecx, 0xfff8
shr eax, 3
xor ebx, ebx
inc ebx
cmp cx, 8
cmova ebx, eax
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x64], ebx
mov eax, ebx
push 0x10
pop ecx
cmp word [ebp - 0x54], cx
push 4
pop ecx
cmove eax, ecx
imul eax, dword [ebp - 0x50]
imul eax, edx
mov dword [ebp - 0x48], eax
test eax, eax
je 0x40eb8d
mov ecx, esi
call fcn.00410235
mov dword [ebp - 0x54], eax
mov edx, dword [ebp - 0x48]
call fcn.00413b76
mov ecx, eax
mov dword [ebp - 0x34], ecx
test ecx, ecx
je 0x40eb8d
mov eax, dword [ebp - 0x58]
imul eax, dword [ebp - 0x3c]
push 0x1f
pop edi
mov dword [ebp - 0x58], edi
add eax, edi
cdq
and edx, edi
add edx, eax
sar edx, 5
shl edx, 2
mov dword [ebp - 0x60], edx
xor edi, edi
mov dword [ebp - 4], edi
mov eax, ebx
sub eax, 1
je 0x40eaa2
sub eax, 1
je 0x40e995
sub eax, 1
je 0x40e92b
sub eax, 1
jne 0x40eaa2
cmp dword [ebp - 0x6c], eax
je 0x40e80f
push 3
pop ebx
mov dword [ebp - 0x64], ebx
mov eax, edi
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x38], eax
mov esi, dword [ebp - 0x50]
cmp eax, esi
jge 0x40ea9f
sub esi, eax
dec esi
cmp dword [ebp - 0x5c], 0
cmovne esi, eax
imul esi, dword [ebp - 0x60]
add esi, dword [ebp - 0x54]
mov dword [ebp - 0x4c], esi
mov ecx, edx
imul ecx, eax
imul ecx, ebx
add ecx, dword [ebp - 0x34]
mov dword [ebp - 0x28], ecx
mov eax, edi
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], ecx
cmp eax, edx
jge 0x40e806
mov al, byte [esi + 3]
not al
movzx edx, al
movzx eax, byte [esi + 2]
mov ecx, 0xff
sub ecx, eax
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
sar eax, 8
add eax, ecx
sar eax, 8
mov ecx, dword [ebp - 0x2c]
mov byte [ecx], al
inc ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
movzx eax, byte [esi + 1]
mov ecx, 0xff
sub ecx, eax
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
sar eax, 8
add eax, ecx
sar eax, 8
mov ecx, dword [ebp - 0x2c]
mov byte [ecx], al
inc ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
movzx eax, byte [esi]
mov ecx, 0xff
sub ecx, eax
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
sar eax, 8
add eax, ecx
sar eax, 8
mov ecx, dword [ebp - 0x2c]
mov byte [ecx], al
inc ecx
mov dword [ebp - 0x28], ecx
push 4
pop eax
add esi, eax
mov dword [ebp - 0x4c], esi
mov eax, dword [ebp - 0x30]
inc eax
mov edx, dword [ebp - 0x3c]
jmp 0x40e76b
mov eax, dword [ebp - 0x38]
inc eax
jmp 0x40e739
cmp dword [ebp - 0x20], 0xc
je 0x40e83f
cmp dword [esi + 0x10], 3
jne 0x40e83f
mov edx, dword [esi + 0x28]
mov dword [ebp - 0x58], edx
mov edx, dword [esi + 0x2c]
mov dword [ebp - 0x48], edx
mov edx, dword [esi + 0x30]
mov dword [ebp - 0x20], edx
cmp dword [esi], 0x38
jb 0x40e83a
mov edx, dword [esi + 0x34]
mov dword [ebp - 0x40], edx
jmp 0x40e85b
mov dword [ebp - 0x40], edi
jmp 0x40e85b
mov dword [ebp - 0x58], 0xff0000
mov dword [ebp - 0x48], 0xff00
mov dword [ebp - 0x20], 0xff
mov dword [ebp - 0x40], 0xff000000
mov eax, edi
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x38], eax
mov esi, dword [ebp - 0x50]
cmp eax, esi
jge 0x40ea9a
mov ebx, esi
sub ebx, eax
dec ebx
cmp dword [ebp - 0x5c], 0
cmovne ebx, eax
imul ebx, dword [ebp - 0x60]
add ebx, dword [ebp - 0x54]
mov dword [ebp - 0x4c], ebx
mov esi, edx
imul esi, eax
imul esi, dword [ebp - 0x2c]
add esi, ecx
mov dword [ebp - 0x28], esi
mov eax, edi
mov dword [ebp - 0x30], eax
cmp eax, edx
jge 0x40e91f
movzx ecx, byte [ebx + 3]
shl ecx, 8
movzx eax, byte [ebx + 2]
or ecx, eax
shl ecx, 8
movzx eax, byte [ebx + 1]
or ecx, eax
shl ecx, 8
movzx eax, byte [ebx]
or ecx, eax
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x58]
call fcn.00410317
mov byte [esi], al
inc esi
mov dword [ebp - 0x28], esi
mov edx, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x44]
call fcn.00410317
mov byte [esi], al
inc esi
mov dword [ebp - 0x28], esi
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x44]
call fcn.00410317
mov byte [esi], al
inc esi
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x40e903
mov edx, eax
mov ecx, dword [ebp - 0x44]
call fcn.00410317
jmp 0x40e905
or al, 0xff
mov byte [esi], al
inc esi
mov dword [ebp - 0x28], esi
push 4
pop eax
add ebx, eax
mov dword [ebp - 0x4c], ebx
mov eax, dword [ebp - 0x30]
inc eax
mov edx, dword [ebp - 0x3c]
jmp 0x40e894
mov eax, dword [ebp - 0x38]
inc eax
mov ecx, dword [ebp - 0x34]
jmp 0x40e860
mov esi, edi
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x38], esi
mov ecx, dword [ebp - 0x50]
cmp esi, ecx
jge 0x40ea9f
sub ecx, esi
dec ecx
cmp dword [ebp - 0x5c], 0
cmovne ecx, esi
imul ecx, edx
add ecx, dword [ebp - 0x54]
mov dword [ebp - 0x4c], ecx
mov edx, eax
imul edx, esi
imul edx, ebx
add edx, dword [ebp - 0x34]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x30], edi
cmp dword [ebp - 0x30], eax
jge 0x40e98f
mov al, byte [ecx]
mov byte [edx + 2], al
inc ecx
mov dword [ebp - 0x4c], ecx
mov al, byte [ecx]
mov byte [edx + 1], al
inc ecx
mov dword [ebp - 0x4c], ecx
mov al, byte [ecx]
mov byte [edx], al
inc ecx
mov dword [ebp - 0x4c], ecx
add edx, 3
mov dword [ebp - 0x28], edx
inc dword [ebp - 0x30]
mov eax, dword [ebp - 0x3c]
jmp 0x40e962
inc esi
mov edx, dword [ebp - 0x60]
jmp 0x40e930
cmp dword [ebp - 0x20], 0xc
je 0x40e9c1
cmp dword [esi + 0x10], 3
jne 0x40e9c1
mov edx, dword [esi + 0x28]
mov dword [ebp - 0x20], edx
mov edx, dword [esi + 0x2c]
mov dword [ebp - 0x48], edx
mov eax, dword [esi + 0x30]
mov dword [ebp - 0x58], eax
cmp dword [esi], 0x38
jb 0x40e9bd
mov eax, dword [esi + 0x34]
jmp 0x40e9d4
mov eax, edi
jmp 0x40e9d4
mov dword [ebp - 0x20], 0x7c00
mov dword [ebp - 0x48], 0x3e0
mov eax, 0x8000
mov dword [ebp - 0x44], eax
xor ebx, ebx
test eax, eax
setne bl
add ebx, 3
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x64], ebx
mov eax, edi
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x38], eax
mov esi, dword [ebp - 0x50]
cmp eax, esi
jge 0x40ea9a
mov ebx, esi
sub ebx, eax
dec ebx
cmp dword [ebp - 0x5c], 0
cmovne ebx, eax
imul ebx, dword [ebp - 0x60]
add ebx, dword [ebp - 0x54]
mov dword [ebp - 0x4c], ebx
mov esi, edx
imul esi, eax
imul esi, dword [ebp - 0x2c]
add esi, ecx
mov dword [ebp - 0x28], esi
mov eax, edi
mov dword [ebp - 0x30], eax
cmp eax, edx
jge 0x40ea8e
movzx ecx, byte [ebx + 1]
shl ecx, 8
movzx eax, byte [ebx]
or ecx, eax
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x20]
call fcn.00410317
mov byte [esi], al
inc esi
mov dword [ebp - 0x28], esi
mov edx, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x40]
call fcn.00410317
mov byte [esi], al
inc esi
mov dword [ebp - 0x28], esi
mov edx, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x40]
call fcn.00410317
mov byte [esi], al
inc esi
mov dword [ebp - 0x28], esi
push 4
pop eax
cmp dword [ebp - 0x2c], eax
jne 0x40ea7f
mov edx, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x40]
call fcn.00410317
mov byte [esi], al
inc esi
mov dword [ebp - 0x28], esi
add ebx, 2
mov dword [ebp - 0x4c], ebx
mov eax, dword [ebp - 0x30]
inc eax
mov edx, dword [ebp - 0x3c]
jmp 0x40ea20
mov eax, dword [ebp - 0x38]
inc eax
mov ecx, dword [ebp - 0x34]
jmp 0x40e9ec
mov ebx, dword [ebp - 0x2c]
jmp 0x40eaa2
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 4], 0xfffffffe
mov esi, dword [ebp - 0x70]
mov eax, dword [ebp - 0x3c]
jmp 0x40ead3
mov dword [ebp - 0x20], edi
lea edx, [ebp - 0x20]
push edx
push ebx
push dword [ebp - 0x50]
mov edx, eax
call fcn.004326d0
add esp, 0xc
mov ebx, eax
test ebx, ebx
jne 0x40eafc
mov ecx, dword [ebp - 0x34]
call fcn.00413b8c
push esi
jmp 0x40eb8e
push edi
push 0x80
push 2
push edi
push edi
push 0xc0000000
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x48], eax
cmp eax, 0xffffffff
jne 0x40eb25
mov ecx, ebx
call fcn.00430080
jmp 0x40eaee
push edi
lea ecx, [ebp - 0x24]
push ecx
mov edi, dword [ebp - 0x20]
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40eb63
cmp dword [ebp - 0x24], edi
jne 0x40eb63
mov ecx, ebx
call fcn.00430080
mov ecx, dword [ebp - 0x34]
call fcn.00413b8c
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
jmp 0x40eb96
mov ecx, ebx
call fcn.00430080
mov ecx, dword [ebp - 0x34]
call fcn.00413b8c
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40eb94
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret