Function at 0x4a9e00
Capabilities:
Check if file exists
Copy file
Create directory
Delete directory
Delete file
Get common file path
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5dc
mov eax, dword [0x50bd24]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov dword [ebp - 0x4d0], 0
mov dword [ebp - 0x5d0], 0
mov dword [ebp - 0x558], 0
mov dword [ebp - 0x55c], 0
mov dword [ebp - 0x4c4], 0x64
mov dword [0x50bcd0], 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax*4 + 0x50f6a0]
mov dword [ebp - 0x4c0], ecx
cmp dword [ebp - 0x4c0], 0
jne 0x4a9e73
mov eax, 0x86180002
jmp 0x4ab04f
mov edx, dword [ebp - 0x4c0]
cmp dword [edx + 0x405c], 0x800
jbe 0x4a9e8f
mov eax, 0x86180007
jmp 0x4ab04f
mov dword [ebp - 0x4d4], 0
jmp 0x4a9eaa
mov eax, dword [ebp - 0x4d4]
add eax, 1
mov dword [ebp - 0x4d4], eax
mov ecx, dword [ebp - 0x4c0]
mov edx, dword [ebp - 0x4d4]
cmp edx, dword [ecx + 0x405c]
jae 0x4ab049
cmp dword [ebp + 0xc], 0
je 0x4a9ed4
call dword [ebp + 0xc]
test eax, eax
jne 0x4a9ed4
jmp 0x4ab049
mov eax, dword [ebp - 0x4d4]
shl eax, 5
mov ecx, dword [ebp - 0x4c0]
add eax, dword [ecx + 0x4050]
mov dword [ebp - 0x538], eax
mov edx, dword [ebp - 0x4c0]
mov eax, dword [edx + 0xb0a8]
mov ecx, dword [ebp - 0x4c0]
lea edx, [ecx + eax*2 + 0xa0a8]
push edx
mov eax, dword [ebp - 0x4d4]
push eax
mov ecx, dword [ebp - 0x4c0]
add ecx, 0x4040
push ecx
call fcn.004aba00
add esp, 0xc
mov dword [ebp - 0x5dc], eax
mov dword [ebp - 0x560], 0
mov dword [ebp - 0x4cc], 0
jmp 0x4a9f50
mov edx, dword [ebp - 0x4cc]
add edx, 1
mov dword [ebp - 0x4cc], edx
mov eax, dword [ebp - 0x4c0]
mov ecx, dword [ebp - 0x4cc]
cmp ecx, dword [eax + 0xbad4]
jae 0x4a9fae
mov edx, dword [ebp - 0x4c0]
mov eax, dword [edx + 0xb0a8]
mov ecx, dword [ebp - 0x4c0]
lea edx, [ecx + eax*2 + 0xa0a8]
push edx
imul eax, dword [ebp - 0x4cc], 0x208
mov ecx, dword [ebp - 0x4c0]
lea edx, [ecx + eax + 0xb0ac]
push edx
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
jne 0x4a9fac
mov dword [ebp - 0x560], 1
jmp 0x4a9fae
jmp 0x4a9f41
cmp dword [ebp - 0x560], 0
je 0x4a9fbc
jmp 0x4a9e9b
mov eax, dword [ebp - 0x4c0]
mov ecx, dword [eax + 0xb0a8]
mov edx, dword [ebp - 0x4c0]
lea eax, [edx + ecx*2 + 0xa0a8]
push eax
lea ecx, [ebp - 0x42c]
call fcn.00415c30
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xbad8
mov dword [ebp - 0x4f8], ecx
mov edx, dword [ebp - 0x4f8]
add edx, 2
mov dword [ebp - 0x584], edx
mov eax, dword [ebp - 0x4f8]
mov cx, word [eax]
mov word [ebp - 0x544], cx
add dword [ebp - 0x4f8], 2
cmp word [ebp - 0x544], 0
jne 0x4aa002
mov edx, dword [ebp - 0x4f8]
sub edx, dword [ebp - 0x584]
sar edx, 1
mov dword [ebp - 0x5b0], edx
je 0x4aa066
push 0
mov eax, dword [ebp - 0x4c0]
add eax, 0xbad8
push eax
lea ecx, [ebp - 0x42c]
call fcn.0042a3f0
test eax, eax
jne 0x4aa066
lea ecx, [ebp - 0x42c]
call fcn.00416010
jmp 0x4a9e9b
mov ecx, dword [ebp - 0x4c0]
mov edx, dword [ecx + 0xb0a8]
mov dword [ebp - 0x4cc], edx
jmp 0x4aa089
mov eax, dword [ebp - 0x4cc]
add eax, 1
mov dword [ebp - 0x4cc], eax
mov ecx, dword [ebp - 0x4cc]
mov edx, dword [ebp - 0x4c0]
movzx eax, word [edx + ecx*2 + 0xa0a8]
test eax, eax
je 0x4aa3fb
mov ecx, dword [ebp - 0x4cc]
mov edx, dword [ebp - 0x4c0]
movzx eax, word [edx + ecx*2 + 0xa0a8]
cmp eax, 0x2f
jne 0x4aa3f6
xor ecx, ecx
mov edx, dword [ebp - 0x4cc]
mov eax, dword [ebp - 0x4c0]
mov word [eax + edx*2 + 0xa0a8], cx
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
push ecx
call fcn.004aec90
add esp, 4
test eax, eax
je 0x4aa3dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x4fc], eax
cmp dword [ebp - 0x4fc], 0xb7
je 0x4aa3dd
cmp dword [ebp - 0x4fc], 0x50
je 0x4aa3dd
cmp dword [ebp - 0x4c4], 0x4e20
jge 0x4aa184
mov edx, dword [ebp - 0x4c4]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x4c0]
add eax, 0xa0a8
push eax
call fcn.004aec90
add esp, 4
test eax, eax
jne 0x4aa151
jmp 0x4aa184
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x4fc], eax
cmp dword [ebp - 0x4fc], 0xb7
je 0x4aa172
cmp dword [ebp - 0x4fc], 0x50
jne 0x4aa174
jmp 0x4aa184
mov ecx, dword [ebp - 0x4c4]
shl ecx, 1
mov dword [ebp - 0x4c4], ecx
jmp 0x4aa11e
cmp dword [ebp - 0x4c4], 0x4e20
jl 0x4aa3d3
push 0
mov edx, dword [ebp - 0x4c0]
add edx, 0xa0a8
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
je 0x4aa3d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x5d4], eax
mov eax, dword [ebp - 0x4c0]
add eax, 0xa0a8
push eax
lea ecx, [ebp - 0x444]
call fcn.00415c30
push 0x4f23f8
lea ecx, [ebp - 0x444]
call fcn.004a95f0
mov dword [ebp - 0x564], 1
push 0
lea ecx, [ebp - 0x444]
call fcn.0042a3e0
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
jne 0x4aa24d
push 9
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
push ecx
lea ecx, [ebp - 0x444]
call fcn.0042a3e0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x4aa23b
mov dword [ebp - 0x564], 0
jmp 0x4aa24d
lea ecx, [ebp - 0x444]
call fcn.0042a3e0
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp dword [ebp - 0x564], 0
je 0x4aa3c8
mov edx, dword [ebp - 0x4c0]
add edx, 0xa0a8
mov dword [ebp - 0x500], edx
mov eax, dword [ebp - 0x500]
add eax, 2
mov dword [ebp - 0x5b4], eax
mov ecx, dword [ebp - 0x500]
mov dx, word [ecx]
mov word [ebp - 0x522], dx
add dword [ebp - 0x500], 2
cmp word [ebp - 0x522], 0
jne 0x4aa27b
mov eax, dword [ebp - 0x500]
sub eax, dword [ebp - 0x5b4]
sar eax, 1
mov dword [ebp - 0x5b8], eax
mov ecx, dword [ebp - 0x5b8]
shl ecx, 1
push ecx
mov edx, dword [ebp - 0x4c0]
add edx, 0xa0a8
push edx
mov eax, dword [ebp + 0x10]
push eax
call fcn.004b5860
add esp, 0xc
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
mov dword [ebp - 0x504], ecx
mov edx, dword [ebp - 0x504]
add edx, 2
mov dword [ebp - 0x5bc], edx
mov eax, dword [ebp - 0x504]
mov cx, word [eax]
mov word [ebp - 0x524], cx
add dword [ebp - 0x504], 2
cmp word [ebp - 0x524], 0
jne 0x4aa2f3
mov edx, dword [ebp - 0x504]
sub edx, dword [ebp - 0x5bc]
sar edx, 1
mov dword [ebp - 0x5c0], edx
xor eax, eax
mov ecx, dword [ebp - 0x5c0]
mov edx, dword [ebp + 0x10]
mov word [edx + ecx*2], ax
mov eax, dword [ebp + 0x10]
add eax, 0xfffffffe
mov dword [ebp - 0x510], eax
mov ecx, dword [ebp - 0x510]
mov dx, word [ecx + 2]
mov word [ebp - 0x526], dx
add dword [ebp - 0x510], 2
cmp word [ebp - 0x526], 0
jne 0x4aa343
mov edi, dword [ebp - 0x510]
mov eax, dword [0x4f2404]
mov dword [edi], eax
mov ecx, dword [0x4f2408]
mov dword [edi + 4], ecx
mov dx, word [0x4f240c]
mov word [edi + 8], dx
mov dword [ebp - 0x4d0], 0x86180003
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov edx, dword [ebp - 0x4d0]
mov dword [ebp - 0x5c4], edx
lea ecx, [ebp - 0x444]
call fcn.00416010
lea ecx, [ebp - 0x42c]
call fcn.00416010
mov eax, dword [ebp - 0x5c4]
jmp 0x4ab04f
lea ecx, [ebp - 0x444]
call fcn.00416010
mov dword [ebp - 0x4c4], 0x64
mov eax, 0x5c
mov ecx, dword [ebp - 0x4cc]
mov edx, dword [ebp - 0x4c0]
mov word [edx + ecx*2 + 0xa0a8], ax
jmp 0x4aa07a
mov eax, dword [ebp - 0x538]
movzx ecx, byte [eax + 0x19]
test ecx, ecx
je 0x4aa70d
mov edx, dword [ebp - 0x4c0]
add edx, 0xa0a8
push edx
call fcn.004aec90
add esp, 4
test eax, eax
je 0x4aa708
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x508], eax
cmp dword [ebp - 0x508], 0xb7
je 0x4aa708
cmp dword [ebp - 0x508], 0x50
je 0x4aa708
cmp dword [ebp - 0x4c4], 0x4e20
jge 0x4aa4ba
mov eax, dword [ebp - 0x4c4]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
push ecx
call fcn.004aec90
add esp, 4
test eax, eax
jne 0x4aa487
jmp 0x4aa4ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x508], eax
cmp dword [ebp - 0x508], 0xb7
je 0x4aa4a8
cmp dword [ebp - 0x508], 0x50
jne 0x4aa4aa
jmp 0x4aa4ba
mov edx, dword [ebp - 0x4c4]
shl edx, 1
mov dword [ebp - 0x4c4], edx
jmp 0x4aa453
cmp dword [ebp - 0x4c4], 0x4e20
jl 0x4aa708
push 0
mov eax, dword [ebp - 0x4c0]
add eax, 0xa0a8
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
je 0x4aa708
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x5d8], eax
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
push ecx
lea ecx, [ebp - 0x474]
call fcn.00415c30
push 0x4f2410
lea ecx, [ebp - 0x474]
call fcn.004a95f0
mov dword [ebp - 0x54c], 1
push 0
mov edx, dword [ebp - 0x4c0]
add edx, 0xa0a8
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
jne 0x4aa583
push 9
mov eax, dword [ebp - 0x4c0]
add eax, 0xa0a8
push eax
lea ecx, [ebp - 0x474]
call fcn.0042a3e0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x4aa571
mov dword [ebp - 0x54c], 0
jmp 0x4aa583
lea ecx, [ebp - 0x474]
call fcn.0042a3e0
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp dword [ebp - 0x54c], 0
je 0x4aa6fd
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
mov dword [ebp - 0x50c], ecx
mov edx, dword [ebp - 0x50c]
add edx, 2
mov dword [ebp - 0x5c8], edx
mov eax, dword [ebp - 0x50c]
mov cx, word [eax]
mov word [ebp - 0x528], cx
add dword [ebp - 0x50c], 2
cmp word [ebp - 0x528], 0
jne 0x4aa5b1
mov edx, dword [ebp - 0x50c]
sub edx, dword [ebp - 0x5c8]
sar edx, 1
mov dword [ebp - 0x5cc], edx
mov eax, dword [ebp - 0x5cc]
shl eax, 1
push eax
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
push ecx
mov edx, dword [ebp + 0x10]
push edx
call fcn.004b5860
add esp, 0xc
mov eax, dword [ebp - 0x4c0]
add eax, 0xa0a8
mov dword [ebp - 0x4dc], eax
mov ecx, dword [ebp - 0x4dc]
add ecx, 2
mov dword [ebp - 0x568], ecx
mov edx, dword [ebp - 0x4dc]
mov ax, word [edx]
mov word [ebp - 0x52a], ax
add dword [ebp - 0x4dc], 2
cmp word [ebp - 0x52a], 0
jne 0x4aa628
mov ecx, dword [ebp - 0x4dc]
sub ecx, dword [ebp - 0x568]
sar ecx, 1
mov dword [ebp - 0x56c], ecx
xor edx, edx
mov eax, dword [ebp - 0x56c]
mov ecx, dword [ebp + 0x10]
mov word [ecx + eax*2], dx
mov edx, dword [ebp + 0x10]
add edx, 0xfffffffe
mov dword [ebp - 0x514], edx
mov eax, dword [ebp - 0x514]
mov cx, word [eax + 2]
mov word [ebp - 0x53e], cx
add dword [ebp - 0x514], 2
cmp word [ebp - 0x53e], 0
jne 0x4aa678
mov edi, dword [ebp - 0x514]
mov edx, dword [str._Dir]
mov dword [edi], edx
mov eax, dword [0x4f2420]
mov dword [edi + 4], eax
mov cx, word [0x4f2424]
mov word [edi + 8], cx
mov dword [ebp - 0x4d0], 0x86180003
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
mov eax, dword [ebp - 0x4d0]
mov dword [ebp - 0x570], eax
lea ecx, [ebp - 0x474]
call fcn.00416010
lea ecx, [ebp - 0x42c]
call fcn.00416010
mov eax, dword [ebp - 0x570]
jmp 0x4ab04f
lea ecx, [ebp - 0x474]
call fcn.00416010
jmp 0x4ab039
mov dword [ebp - 0x4c4], 0x64
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
push ecx
lea edx, [ebp - 0x4c8]
push edx
call fcn.004aecc0
add esp, 8
test eax, eax
je 0x4aac30
cmp dword [ebp - 0x4c4], 0x4e20
jge 0x4aa786
mov eax, dword [ebp - 0x4c4]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
push ecx
lea edx, [ebp - 0x4c8]
push edx
call fcn.004aecc0
add esp, 8
test eax, eax
jne 0x4aa776
jmp 0x4aa786
mov eax, dword [ebp - 0x4c4]
shl eax, 1
mov dword [ebp - 0x4c4], eax
jmp 0x4aa73b
cmp dword [ebp - 0x4c4], 0x4e20
jl 0x4aac26
mov dword [ebp - 0x554], 0
mov dword [ebp - 0x4d8], 0
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4aa872
mov edx, dword [ebp - 0x4c0]
add edx, 0xa0a8
push edx
lea ecx, [ebp - 0x48c]
call fcn.00415c30
push str._rename
lea eax, [ebp - 0x48c]
push eax
lea ecx, [ebp - 0x4bc]
push ecx
call fcn.004a9560
add esp, 0xc
push eax
lea ecx, [ebp - 0x48c]
call fcn.00422750
lea ecx, [ebp - 0x4bc]
call fcn.00416010
push 9
lea ecx, [ebp - 0x48c]
call fcn.0042a3e0
push eax
mov edx, dword [ebp - 0x4c0]
add edx, 0xa0a8
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x4aa83e
mov dword [ebp - 0x554], 1
mov eax, dword [ebp - 0x4c0]
add eax, 0xa0a8
push eax
lea ecx, [ebp - 0x4c8]
push ecx
call fcn.004aecc0
add esp, 8
test eax, eax
jne 0x4aa867
mov dword [ebp - 0x4d8], 1
lea ecx, [ebp - 0x48c]
call fcn.00416010
cmp dword [ebp - 0x4d8], 0
jne 0x4aa963
mov edx, dword [ebp - 0x4c0]
add edx, 0xa0a8
push edx
lea ecx, [ebp - 0x45c]
call fcn.00415c30
push str._temp
lea eax, [ebp - 0x45c]
push eax
lea ecx, [ebp - 0x4a4]
push ecx
call fcn.004a9560
add esp, 0xc
push eax
lea ecx, [ebp - 0x45c]
call fcn.00422750
lea ecx, [ebp - 0x4a4]
call fcn.00416010
lea ecx, [ebp - 0x45c]
call fcn.0042a3e0
push eax
lea edx, [ebp - 0x4c8]
push edx
call fcn.004aecc0
add esp, 8
test eax, eax
jne 0x4aa958
mov eax, dword [ebp - 0x4c8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xb
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
push ecx
lea ecx, [ebp - 0x45c]
call fcn.0042a3e0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x4aa958
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
mov edx, dword [ebp - 0x4c0]
add edx, 0xa0a8
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4c8], eax
cmp dword [ebp - 0x4c8], 0xffffffff
je 0x4aa958
mov dword [ebp - 0x4d8], 1
lea ecx, [ebp - 0x45c]
call fcn.00416010
mov dword [ebp - 0x534], 0
cmp dword [ebp - 0x4d8], 0
jne 0x4aaa99
push 0x208
push 0
lea eax, [ebp - 0x414]
push eax
call fcn.004b5de0
add esp, 0xc
push 0x208
push 0
lea ecx, [ebp - 0x20c]
push ecx
call fcn.004b5de0
add esp, 0xc
lea edx, [ebp - 0x414]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.thunderErrorFile
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x550], eax
cmp dword [ebp - 0x550], 0xffffffff
je 0x4aaa99
mov eax, dword [ebp - 0x550]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
push ecx
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x4aaa7b
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
mov eax, dword [ebp - 0x4c0]
add eax, 0xa0a8
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4c8], eax
cmp dword [ebp - 0x4c8], 0xffffffff
je 0x4aaa6f
mov dword [ebp - 0x4d8], 1
jmp 0x4aaa7b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x534], eax
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4aaa99
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x4d8], 0
jne 0x4aac26
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x534], eax
mov eax, dword [ebp - 0x4c0]
add eax, 0xa0a8
mov dword [ebp - 0x4e0], eax
mov ecx, dword [ebp - 0x4e0]
add ecx, 2
mov dword [ebp - 0x574], ecx
mov edx, dword [ebp - 0x4e0]
mov ax, word [edx]
mov word [ebp - 0x52c], ax
add dword [ebp - 0x4e0], 2
cmp word [ebp - 0x52c], 0
jne 0x4aaad2
mov ecx, dword [ebp - 0x4e0]
sub ecx, dword [ebp - 0x574]
sar ecx, 1
mov dword [ebp - 0x578], ecx
mov edx, dword [ebp - 0x578]
shl edx, 1
push edx
mov eax, dword [ebp - 0x4c0]
add eax, 0xa0a8
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.004b5860
add esp, 0xc
mov edx, dword [ebp - 0x4c0]
add edx, 0xa0a8
mov dword [ebp - 0x4e4], edx
mov eax, dword [ebp - 0x4e4]
add eax, 2
mov dword [ebp - 0x57c], eax
mov ecx, dword [ebp - 0x4e4]
mov dx, word [ecx]
mov word [ebp - 0x52e], dx
add dword [ebp - 0x4e4], 2
cmp word [ebp - 0x52e], 0
jne 0x4aab49
mov eax, dword [ebp - 0x4e4]
sub eax, dword [ebp - 0x57c]
sar eax, 1
mov dword [ebp - 0x580], eax
xor ecx, ecx
mov edx, dword [ebp - 0x580]
mov eax, dword [ebp + 0x10]
mov word [eax + edx*2], cx
mov ecx, dword [ebp + 0x10]
add ecx, 0xfffffffe
mov dword [ebp - 0x518], ecx
mov edx, dword [ebp - 0x518]
mov ax, word [edx + 2]
mov word [ebp - 0x548], ax
add dword [ebp - 0x518], 2
cmp word [ebp - 0x548], 0
jne 0x4aab99
mov edi, dword [ebp - 0x518]
mov ecx, dword [str._Open]
mov dword [edi], ecx
mov edx, dword [0x4f246c]
mov dword [edi + 4], edx
mov eax, dword [0x4f2470]
mov dword [edi + 8], eax
cmp dword [ebp - 0x554], 0
je 0x4aabef
mov dword [ebp - 0x4d0], 0x86180006
jmp 0x4aabf9
mov dword [ebp - 0x4d0], 0x86180003
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x534]
mov dword [ecx], edx
mov eax, dword [ebp - 0x4d0]
mov dword [ebp - 0x5ac], eax
lea ecx, [ebp - 0x42c]
call fcn.00416010
mov eax, dword [ebp - 0x5ac]
jmp 0x4ab04f
mov dword [ebp - 0x4c4], 0x64
mov ecx, dword [ebp - 0x55c]
mov dword [ebp - 0x558], ecx
mov edx, dword [ebp - 0x4d4]
mov eax, dword [ebp - 0x4c0]
lea ecx, [eax + edx*4 + 0x80a8]
push ecx
mov edx, dword [ebp - 0x4d4]
mov eax, dword [ebp - 0x4c0]
mov ecx, dword [eax + edx*4 + 0x60a8]
push ecx
lea edx, [ebp - 0x4c8]
push edx
call fcn.004aeba0
add esp, 0xc
test eax, eax
jne 0x4aac89
mov eax, dword [ebp - 0x558]
cmp eax, dword [ebp - 0x55c]
je 0x4aae6a
cmp dword [ebp - 0x4c4], 0x4e20
jge 0x4aacef
mov ecx, dword [ebp - 0x4c4]
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 0x4d4]
mov eax, dword [ebp - 0x4c0]
lea ecx, [eax + edx*4 + 0x80a8]
push ecx
mov edx, dword [ebp - 0x4d4]
mov eax, dword [ebp - 0x4c0]
mov ecx, dword [eax + edx*4 + 0x60a8]
push ecx
lea edx, [ebp - 0x4c8]
push edx
call fcn.004aeba0
add esp, 0xc
test eax, eax
jne 0x4aacdf
jmp 0x4aacef
mov eax, dword [ebp - 0x4c4]
shl eax, 1
mov dword [ebp - 0x4c4], eax
jmp 0x4aac89
cmp dword [ebp - 0x4c4], 0x4e20
jl 0x4aae6a
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
mov dword [ebp - 0x4e8], ecx
mov edx, dword [ebp - 0x4e8]
add edx, 2
mov dword [ebp - 0x588], edx
mov eax, dword [ebp - 0x4e8]
mov cx, word [eax]
mov word [ebp - 0x546], cx
add dword [ebp - 0x4e8], 2
cmp word [ebp - 0x546], 0
jne 0x4aad20
mov edx, dword [ebp - 0x4e8]
sub edx, dword [ebp - 0x588]
sar edx, 1
mov dword [ebp - 0x58c], edx
mov eax, dword [ebp - 0x58c]
shl eax, 1
push eax
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
push ecx
mov edx, dword [ebp + 0x10]
push edx
call fcn.004b5860
add esp, 0xc
mov eax, dword [ebp - 0x4c0]
add eax, 0xa0a8
mov dword [ebp - 0x4ec], eax
mov ecx, dword [ebp - 0x4ec]
add ecx, 2
mov dword [ebp - 0x590], ecx
mov edx, dword [ebp - 0x4ec]
mov ax, word [edx]
mov word [ebp - 0x530], ax
add dword [ebp - 0x4ec], 2
cmp word [ebp - 0x530], 0
jne 0x4aad97
mov ecx, dword [ebp - 0x4ec]
sub ecx, dword [ebp - 0x590]
sar ecx, 1
mov dword [ebp - 0x594], ecx
xor edx, edx
mov eax, dword [ebp - 0x594]
mov ecx, dword [ebp + 0x10]
mov word [ecx + eax*2], dx
mov edx, dword [ebp + 0x10]
add edx, 0xfffffffe
mov dword [ebp - 0x520], edx
mov eax, dword [ebp - 0x520]
mov cx, word [eax + 2]
mov word [ebp - 0x542], cx
add dword [ebp - 0x520], 2
cmp word [ebp - 0x542], 0
jne 0x4aade7
mov edi, dword [ebp - 0x520]
mov edx, dword [str._Write]
mov dword [edi], edx
mov eax, dword [0x4f2478]
mov dword [edi + 4], eax
mov ecx, dword [0x4f247c]
mov dword [edi + 8], ecx
mov dx, word [0x4f2480]
mov word [edi + 0xc], dx
mov dword [ebp - 0x4d0], 0x86180003
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov edx, dword [ebp - 0x4d0]
mov dword [ebp - 0x598], edx
lea ecx, [ebp - 0x42c]
call fcn.00416010
mov eax, dword [ebp - 0x598]
jmp 0x4ab04f
lea eax, [ebp - 0x4c8]
push eax
call fcn.004ae980
add esp, 4
test eax, eax
je 0x4ab00f
cmp dword [0x50bcd0], 0
je 0x4aae9f
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [0x50bcd0], 0
lea ecx, [ebp - 0x4c8]
push ecx
call fcn.004ae980
add esp, 4
test eax, eax
je 0x4ab00f
mov edx, dword [ebp - 0x4c0]
add edx, 0xa0a8
mov dword [ebp - 0x4f0], edx
mov eax, dword [ebp - 0x4f0]
add eax, 2
mov dword [ebp - 0x59c], eax
mov ecx, dword [ebp - 0x4f0]
mov dx, word [ecx]
mov word [ebp - 0x540], dx
add dword [ebp - 0x4f0], 2
cmp word [ebp - 0x540], 0
jne 0x4aaed7
mov eax, dword [ebp - 0x4f0]
sub eax, dword [ebp - 0x59c]
sar eax, 1
mov dword [ebp - 0x5a0], eax
mov ecx, dword [ebp - 0x5a0]
shl ecx, 1
push ecx
mov edx, dword [ebp - 0x4c0]
add edx, 0xa0a8
push edx
mov eax, dword [ebp + 0x10]
push eax
call fcn.004b5860
add esp, 0xc
mov ecx, dword [ebp - 0x4c0]
add ecx, 0xa0a8
mov dword [ebp - 0x4f4], ecx
mov edx, dword [ebp - 0x4f4]
add edx, 2
mov dword [ebp - 0x5a4], edx
mov eax, dword [ebp - 0x4f4]
mov cx, word [eax]
mov word [ebp - 0x53c], cx
add dword [ebp - 0x4f4], 2
cmp word [ebp - 0x53c], 0
jne 0x4aaf4f
mov edx, dword [ebp - 0x4f4]
sub edx, dword [ebp - 0x5a4]
sar edx, 1
mov dword [ebp - 0x5a8], edx
xor eax, eax
mov ecx, dword [ebp - 0x5a8]
mov edx, dword [ebp + 0x10]
mov word [edx + ecx*2], ax
mov eax, dword [ebp + 0x10]
add eax, 0xfffffffe
mov dword [ebp - 0x51c], eax
mov ecx, dword [ebp - 0x51c]
mov dx, word [ecx + 2]
mov word [ebp - 0x53a], dx
add dword [ebp - 0x51c], 2
cmp word [ebp - 0x53a], 0
jne 0x4aaf9f
mov edi, dword [ebp - 0x51c]
mov eax, dword [str._Close]
mov dword [edi], eax
mov ecx, dword [0x4f2488]
mov dword [edi + 4], ecx
mov edx, dword [0x4f248c]
mov dword [edi + 8], edx
mov ax, word [0x4f2490]
mov word [edi + 0xc], ax
mov dword [ebp - 0x4d0], 0x86180003
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
lea ecx, [ebp - 0x42c]
call fcn.00416010
jmp 0x4a9e9b
mov edx, dword [ebp - 0x538]
movzx eax, byte [edx + 0x1d]
test eax, eax
je 0x4ab039
mov ecx, dword [ebp - 0x538]
mov edx, dword [ecx + 0x14]
push edx
mov eax, dword [ebp - 0x4c0]
add eax, 0xa0a8
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [ebp - 0x42c]
call fcn.00416010
jmp 0x4a9e9b
mov eax, dword [ebp - 0x4d0]
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b42e4
mov esp, ebp
pop ebp
ret