Function at 0x40d1f6
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x88
lea eax, [ebp - 0x18]
mov dword [ebp - 0x40], ecx
lea edi, [ebp - 0x34]
mov dword [eax - 4], esp
or dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0x4e8b50
mov ecx, dword fs:[0]
mov dword [eax], ecx
mov ecx, edi
mov dword fs:[0], eax
call fcn.004c7390
lea esi, [ebp - 0x94]
mov edx, edi
mov ecx, esi
push 0x512f1c
call fcn.00402da6
pop eax
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
mov dword [ebp - 0x60], ecx
call fcn.004d0bd0
mov ecx, eax
push 0x512f2c
call fcn.00402c67
pop ecx
lea edi, [ebp - 0x6c]
mov ebx, eax
lea esi, [eax + edx]
mov dword [ebp - 0x24], edx
mov ecx, edi
mov edx, esi
push eax
call fcn.00402a6b
pop eax
mov edi, dword [edi + 8]
lea eax, [ebp - 0x34]
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x20], esi
mov dword [eax], esi
mov dword [eax + 4], ebx
lea edx, [edi - 1]
call fcn.00402809
mov ecx, eax
mov edx, 0x512f3c
mov esi, eax
call fcn.00402cab
cmp esi, 0x65
jne 0x40d2ff
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 0x34]
lea edx, [edi - 2]
mov dword [ecx], eax
mov dword [ecx + 4], ebx
call fcn.00402809
mov ecx, eax
mov edx, 0x512f4c
mov esi, eax
call fcn.00402cab
cmp esi, 0x78
jne 0x40d2ff
mov edi, dword [ebp - 0x40]
mov ecx, dword [edi + 0x34]
mov edx, dword [edi + 0x38]
lea esi, [edi + 0x34]
call fcn.0043d0cd
and dword [edi + 0x34], 0
mov dword [edi + 0x38], 1
and dword [edi + 0x3c], 0
mov edx, dword [ebp - 0x20]
mov ecx, esi
push ebx
call fcn.00416a75
pop eax
mov dword [ebp - 0x20], 0
jmp 0x40d448
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x3c], ebx
mov ecx, ebx
push 0x2e
call fcn.00402449
pop ecx
test eax, eax
je 0x40d756
mov eax, dword [ebp - 0x68]
lea esi, [edi*4 + 4]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
mov edx, edi
sub edi, 1
setb bl
push 0x512f6c
push edi
call fcn.00403ccf
pop ecx
pop edx
add esi, 0xfffffffc
cmp dword [eax], 0x2e
je 0x40d348
test bl, bl
je 0x40d324
inc edi
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x64], edi
lea edi, [ebp - 0x78]
mov eax, dword [ebp - 0x6c]
and dword [edi], 0
mov dword [edi + 4], 1
and dword [edi + 8], 0
mov dword [ebp - 0x38], eax
test esi, esi
je 0x40d37b
mov edx, dword [ebx]
mov ecx, edi
add ebx, 4
call fcn.00403181
add esi, 0xfffffffc
jmp 0x40d366
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x20]
call fcn.004e01be
lea edi, [ebp - 0x78]
mov eax, str.exe.
lea edx, [0x512f7f]
mov ecx, edi
push eax
call fcn.00416a75
pop eax
mov esi, dword [ebp - 0x40]
mov ecx, dword [esi + 0x34]
mov edx, dword [esi + 0x38]
lea ebx, [esi + 0x34]
call fcn.0043d0cd
and dword [esi + 0x34], 0
mov dword [esi + 0x38], 1
and dword [esi + 0x3c], 0
mov eax, dword [edi + 4]
mov esi, dword [edi + 8]
mov ecx, ebx
lea edx, [eax + esi]
mov dword [ebp - 0x20], eax
push eax
call fcn.00416a75
pop eax
mov eax, dword [edi]
mov edx, dword [ebp - 0x3c]
lea edi, [ebp - 0x34]
mov ecx, edi
mov dword [ebp - 0x38], eax
push dword [ebp - 0x24]
call fcn.004c2a70
pop eax
xor eax, eax
cmp dword [edi], eax
je 0x40d3f6
mov ebx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
jmp 0x40d426
lea edx, [ebp - 0x34]
mov eax, dword [edx + 4]
mov ecx, dword [edx + 8]
mov edi, dword [edx + 0xc]
mov dword [edx + 4], ecx
mov dword [edx], eax
mov dword [edx + 8], edi
lea edi, [ebp - 0x50]
mov ecx, edi
call fcn.004c8720
cmp dword [edi], 0
je 0x40d65c
mov ebx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x48]
lea edi, [ebp - 0x34]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x20]
call fcn.0043d0cd
cmp bl, 4
je 0x40d443
push edi
call fcn.00401ea2
pop eax
mov al, 1
mov dword [ebp - 0x20], eax
call fcn.004cc600
xor ecx, ecx
mov esi, eax
call fcn.004bfc80
mov dword [ebp - 0x5c], eax
lock inc dword [eax]
jle 0x40d752
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x24], eax
and dword [ecx], 0
and dword [ecx + 4], 0
call fcn.0040312c
mov dword [ebp - 0x50], eax
lock inc dword [eax]
jle 0x40d752
xor ecx, ecx
mov ebx, eax
xor edi, edi
call fcn.004cb3b0
mov esi, eax
test eax, eax
je 0x40d49f
lock inc dword [esi]
mov edi, esi
jle 0x40d752
mov ecx, edi
call fcn.004cb3b0
lea ecx, [ebp - 0x34]
mov dword [ecx], eax
call fcn.00401dbe
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x40d4bf
add ecx, 8
call fcn.004c2fd0
push 0xc
pop ecx
push 4
pop edx
call fcn.00403157
mov edi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x3c]
mov dword [eax], esi
lea esi, [ebp - 0x34]
mov ecx, esi
mov dword [eax + 4], edi
mov dword [eax + 8], ebx
push 0x51052c
push eax
call fcn.004cc720
pop eax
pop ecx
movzx esi, byte [esi]
cmp esi, 4
jne 0x40d502
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], ebx
xor eax, eax
jmp 0x40d536
mov eax, dword [ebp - 0x30]
movzx edi, byte [ebp - 0x31]
movzx ebx, word [ebp - 0x33]
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x24], eax
call fcn.004022fc
lea ecx, [ebp - 0x5c]
call fcn.00401e61
mov eax, dword [ebp - 0x24]
shl ebx, 8
shl edi, 0x18
or edi, ebx
or edi, esi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], eax
xor eax, eax
inc eax
lea esi, [ebp - 0x50]
lea edx, [ebp - 0x34]
mov ecx, esi
mov dword [edx], eax
call fcn.00402cee
mov ecx, esi
call fcn.00402259
push 5
pop ebx
lea edi, [ebp - 0x84]
mov edx, 0x512ed4
mov ecx, edi
push ebx
call fcn.004110e9
pop eax
mov ecx, edi
xor edx, edx
call fcn.00403181
mov edx, dword [edi + 4]
lea esi, [ebp - 0x78]
mov ecx, esi
mov dword [ebp - 0x24], edx
push dword [edi + 8]
call fcn.00410de6
pop eax
mov eax, dword [esi + 4]
lea edi, [ebp - 0x5c]
mov edx, 0x512f7f
mov ecx, edi
mov dword [ebp - 0x38], eax
push ebx
call fcn.004110e9
pop eax
mov ecx, edi
xor edx, edx
call fcn.00403181
mov edx, dword [edi + 4]
lea esi, [ebp - 0x50]
mov ecx, esi
mov dword [ebp - 0x3c], edx
push dword [edi + 8]
call fcn.00410de6
pop eax
mov eax, dword [ebp - 0x40]
mov ebx, dword [esi + 4]
lea esi, [ebp - 0x34]
mov ecx, esi
mov edx, dword [eax + 0x38]
push dword [eax + 0x3c]
call fcn.00410de6
pop eax
mov edi, dword [esi + 4]
mov esi, dword [ebp - 0x38]
mov ecx, ebx
mov edx, edi
push esi
call fcn.00403a06
pop ecx
lea ecx, [ebp - 0x34]
mov edx, edi
mov dword [ebp - 0x40], eax
mov ecx, dword [ecx]
call fcn.004bd0bc
lea eax, [ebp - 0x50]
mov edx, ebx
mov ecx, dword [eax]
call fcn.004bd0bc
lea eax, [ebp - 0x5c]
mov edx, dword [ebp - 0x3c]
mov ecx, dword [eax]
call fcn.0043d0cd
lea eax, [ebp - 0x78]
mov edx, esi
mov ecx, dword [eax]
call fcn.004bd0bc
lea eax, [ebp - 0x84]
mov edx, dword [ebp - 0x24]
mov ecx, dword [eax]
call fcn.0043d0cd
cmp byte [ebp - 0x20], 0
jne 0x40d631
mov ecx, dword [ebp - 0x6c]
mov edx, dword [ebp - 0x68]
call fcn.004e01be
cmp dword [ebp - 0x40], 0x21
mov ecx, dword [ebp - 0x94]
mov edx, dword [ebp - 0x60]
setge bl
call fcn.0043d0cd
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, ebx
add esp, 0x88
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x44]
and dword [ebp - 0x10], 0
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x5c], edx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x54], eax
lea ecx, [ebp - 0x34]
push esi
call fcn.004c2a70
pop eax
cmp dword [ebp - 0x34], 0
lea edi, [ebp - 0x34]
je 0x40d696
mov ebx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
jmp 0x40d6c1
lea edx, [ebp - 0x34]
mov ecx, dword [edx + 8]
mov eax, dword [edx + 4]
mov esi, dword [edx + 0xc]
mov dword [edx + 4], ecx
lea ecx, [ebp - 0x50]
mov dword [edx], eax
mov dword [edx + 8], esi
call fcn.004c8720
cmp dword [ebp - 0x50], 0
lea edi, [ebp - 0x34]
je 0x40d6e1
mov ebx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x24], 0
je 0x40d42c
push 2
pop edx
mov ecx, dword [ebp - 0x3c]
call fcn.004147c0
jmp 0x40d42c
mov edi, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x48]
push 1
push esi
mov ebx, dword [ebp - 0x3c]
push ebx
call dword [sym.imp.kernel32.dll_MoveFileExW]
test eax, eax
je 0x40d724
test edi, edi
mov byte [ebp - 0x34], 4
je 0x40d70a
push 2
pop edx
mov ecx, esi
call fcn.004147c0
cmp dword [ebp - 0x24], 0
lea edi, [ebp - 0x34]
je 0x40d71d
push 2
pop edx
mov ecx, ebx
call fcn.004147c0
mov bl, 4
jmp 0x40d42c
call dword [sym.imp.kernel32.dll_GetLastError]
xor ebx, ebx
mov byte [ebp - 0x34], bl
and word [ebp - 0x33], 0
test edi, edi
lea edi, [ebp - 0x34]
mov byte [ebp - 0x31], bl
mov dword [ebp - 0x30], eax
je 0x40d6c7
push 2
pop edx
mov ecx, esi
call fcn.004147c0
xor ebx, ebx
jmp 0x40d6c7
ud2
push 0x2b
pop edx
mov ecx, str.called__Option::unwrap____on_a__None__value
push 0x512f5c
call fcn.0050af40
pop eax
ud2