Function at 0x447061
Capabilities:
Check if file exists
Get file attributes
Set current directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4735cd
mov eax, dword fs:[0]
push eax
sub esp, 0xd90
mov eax, dword [0x4a0590]
xor eax, esp
mov dword [esp + 0xd88], eax
push ebx
push esi
push edi
mov eax, dword [0x4a0590]
xor eax, esp
push eax
lea eax, [esp + 0xda0]
mov dword fs:[0], eax
xor ebx, ebx
mov edi, ecx
mov dword [esp + 0x2c], ebx
lea eax, [esp + 0x114]
mov dword [esp + 0x1c], edi
mov byte [esp + 0x110], bl
call fcn.0043bdc9
mov dword [esp + 0x134], ebx
mov byte [esp + 0x138], bl
lea eax, [esp + 0x13c]
mov dword [esp + 0xda8], ebx
call fcn.0043bdc9
lea eax, [esp + 0xd4]
call fcn.0043bdc9
mov byte [esp + 0xda8], 2
mov esi, dword [edi + 0x8c]
add esi, 0x188
push 0x486a08
lea eax, [esp + 0x48]
mov byte [esp + 0x1f], bl
mov dword [esp + 0x28], esi
call fcn.0043bde9
lea eax, [esp + 0x44]
lea ebx, [edi + 0x24]
push eax
mov byte [esp + 0xdac], 3
call fcn.0043be60
mov dword [esp + 0x20], eax
lea eax, [esp + 0x44]
mov byte [esp + 0xda8], 2
call fcn.0043b39a
push 0x485ef0
lea eax, [esp + 0x68]
call fcn.0043bde9
lea eax, [esp + 0x64]
push eax
mov byte [esp + 0xdac], 4
call fcn.0043be60
mov ebx, eax
lea eax, [esp + 0x64]
mov dword [esp + 0x30], ebx
mov byte [esp + 0xda8], 2
call fcn.0043b39a
mov eax, dword [esp + 0x20]
cmp dword [eax + 0x14], 0
je 0x447937
cmp dword [ebx + 0x14], 0
je 0x447937
push esi
mov dword [esp + 0x38], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [esp + 0xda8], 5
call fcn.00441b2e
mov dword [esi + 0x18], 1
cmp dword [ebx + 0x18], 8
lea eax, [ebx + 4]
mov dword [esp + 0x14], eax
jb 0x4471c0
mov ecx, dword [eax]
jmp 0x4471c2
mov ecx, eax
mov eax, dword [esp + 0x20]
cmp dword [eax + 0x18], 8
jb 0x4471d7
add eax, 4
mov dword [esp + 0x28], eax
mov eax, dword [eax]
jmp 0x4471de
add eax, 4
mov dword [esp + 0x28], eax
push ecx
push eax
push 5
call fcn.00441cd3
add esp, 0xc
push esi
mov byte [esp + 0xdac], 2
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebx + 0x18], 8
mov eax, dword [esp + 0x14]
jb 0x447205
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x447266
and eax, 0x10
cmp al, 0x10
je 0x447292
cmp dword [ebx + 0x18], 8
jb 0x447226
mov eax, dword [esp + 0x14]
mov ebx, dword [eax]
jmp 0x44722a
mov ebx, dword [esp + 0x14]
call fcn.00448382
mov dword [edi + 0x80], eax
test eax, eax
je 0x44728e
mov esi, eax
lea eax, [esp + 0xd4]
call fcn.0043b39a
lea eax, [esp + 0x13c]
call fcn.0043b39a
lea eax, [esp + 0x114]
call fcn.0043b39a
mov eax, esi
jmp 0x44795d
cmp dword [ebx + 0x18], 8
jb 0x447274
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
jmp 0x447278
mov ecx, dword [esp + 0x14]
call fcn.00448625
mov dword [edi + 0x80], eax
test eax, eax
jne 0x447239
mov byte [esp + 0x1b], 1
jmp 0x447292
mov ebx, dword [esp + 0x30]
push esi
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x20]
add esi, 0x60
mov byte [esp + 0xda8], 6
mov dword [esp + 0x30], esi
call fcn.0043ba47
mov esi, dword [esp + 0x24]
sub esi, 0xffffff80
mov edi, ebx
mov dword [esp + 0x34], esi
call fcn.0043ba47
push dword [esp + 0x24]
mov byte [esp + 0xdac], 2
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [esp + 0x13c]
call fcn.0043ba47
mov eax, esi
call fcn.00447d9a
mov eax, dword [esp + 0x20]
cmp dword [eax + 0x18], 8
mov eax, dword [esp + 0x28]
jb 0x4472fc
mov eax, dword [eax]
push eax
lea esi, [esp + 0xf8]
call fcn.004095a2
mov byte [esp + 0xda8], 7
push 0
mov esi, 0x4869bc
jmp 0x447329
push 0x47ef90
push 1
push edi
push eax
call fcn.00447a60
push edi
push esi
lea eax, [esp + 0xfc]
push eax
call fcn.0043910c
mov edi, eax
lea eax, [esp + 0xf4]
cmp edi, 0xffffffff
jne 0x44731a
push 1
call fcn.00447a8f
push eax
lea eax, [esp + 0xf8]
push eax
xor ebx, ebx
lea esi, [esp + 0x164]
call fcn.00439136
mov byte [esp + 0xda8], 8
cmp dword [esp + 0x174], 8
mov eax, dword [esp + 0x160]
jae 0x447383
lea eax, [esp + 0x160]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 1
lea eax, [esp + 0xf8]
call fcn.00447a8f
mov esi, eax
push 1
lea eax, [esp + 0xf8]
call fcn.00447a8f
mov ecx, dword [esp + 0x108]
sub ecx, esi
lea ebx, [eax + 1]
push ecx
lea eax, [esp + 0xf8]
push eax
lea esi, [esp + 0x180]
call fcn.00439136
mov byte [esp + 0xda8], 9
cmp dword [esp + 0x190], 8
mov edi, dword [esp + 0x17c]
jae 0x4473e9
lea edi, [esp + 0x17c]
lea esi, [esp + 0x64]
call fcn.0043dbcf
mov byte [esp + 0xda8], 0xa
cmp dword [eax + 0x18], 0x10
jb 0x447405
mov eax, dword [eax + 4]
jmp 0x447408
add eax, 4
push eax
call fcn.00407bd0
pop ecx
mov esi, eax
lea ecx, [esp + 0x80]
mov dword [esp + 0x14], esi
mov byte [esp + 0xda8], 9
call fcn.0043d20a
push 0
push 1
lea ecx, [esp + 0x6c]
call fcn.0040940a
test esi, esi
je 0x4478b4
push 0x400000
call fcn.00452c78
mov dword [esp + 0x24], eax
mov dword [esp], 0x3ff
lea eax, [esp + 0x199]
push 0
push eax
mov byte [esp + 0x1a0], 0
call fcn.0045f360
add esp, 0xc
call fcn.0040845d
mov edi, dword [esp + 0x1c]
jmp 0x4474b6
lea eax, [esp + 0x194]
push eax
push dword [esp + 0x18]
lea ebx, [esp + 0x8c]
call fcn.004083d2
pop ecx
pop ecx
mov dword [edi + 0x80], eax
test eax, eax
jne 0x4474c0
mov esi, dword [esp + 0x24]
push eax
push dword [esp + 0xa4]
call fcn.00441c07
mov esi, dword [esp + 0x14]
call fcn.004084ab
mov dword [edi + 0x80], eax
test eax, eax
je 0x447478
mov esi, dword [esp + 0x14]
call fcn.0040845d
mov dword [edi + 0x80], eax
test eax, eax
jne 0x4477d9
jmp 0x4474db
mov edi, ecx
lea eax, [esp + 0x194]
push eax
push dword [esp + 0x18]
lea ebx, [esp + 0x8c]
call fcn.004083d2
pop ecx
pop ecx
mov dword [edi + 0x80], eax
test eax, eax
jne 0x4477d9
push 0x800
push eax
mov byte [esp + 0x118], al
lea eax, [esp + 0x59c]
push eax
call fcn.0045f360
add esp, 0xc
lea ebx, [esp + 0x194]
lea edi, [esp + 0x44]
call fcn.0043dcd2
cmp dword [eax + 0x18], 8
jb 0x44753b
mov ecx, dword [eax + 4]
jmp 0x44753e
lea ecx, [eax + 4]
lea edx, [esp + 0x594]
movzx eax, word [ecx]
inc ecx
mov word [edx], ax
inc ecx
inc edx
inc edx
test ax, ax
jne 0x447545
lea eax, [esp + 0x44]
call fcn.0043b39a
lea eax, [esp + 0x594]
push eax
push dword [esp + 0x20]
lea ebx, [esp + 0x118]
call fcn.00447981
xor ebx, ebx
cmp byte [esp + 0x110], bl
je 0x44759f
cmp byte [esp + 0x138], bl
je 0x44759f
mov edi, dword [esp + 0x24]
push ebx
push dword [esp + 0xa4]
call fcn.00441c2b
jmp 0x4477ba
lea edi, [esp + 0x13c]
lea esi, [esp + 0xd4]
call fcn.0043ba47
cmp byte [esp + 0x110], bl
je 0x4475cd
cmp dword [esp + 0x128], ebx
je 0x4475cd
lea eax, [esp + 0x114]
jmp 0x4475ec
lea ebx, [esp + 0x194]
lea edi, [esp + 0x44]
call fcn.0043dcd2
mov byte [esp + 0xda8], 0xb
or dword [esp + 0x2c], 1
xor ebx, ebx
push 0xffffffffffffffff
push ebx
lea esi, [esp + 0xdc]
call fcn.0040cb6f
mov dword [esp + 0xda8], 9
test byte [esp + 0x2c], 1
je 0x44761b
and dword [esp + 0x2c], 0xfffffffe
lea eax, [esp + 0x44]
call fcn.0043b39a
mov eax, dword [esp + 0x24]
push eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [esp + 0x594]
push eax
push dword [esp + 0x34]
mov byte [esp + 0xdb0], 0xc
call fcn.004095cb
mov esi, dword [esp + 0x34]
lea edi, [esp + 0xd4]
call fcn.0043ba47
push dword [esp + 0x24]
mov byte [esp + 0xdac], 9
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [esp + 0x1b], bl
jne 0x447702
cmp dword [esp + 0xec], 8
mov eax, dword [esp + 0xd8]
jae 0x447687
lea eax, [esp + 0xd8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
je 0x447702
cmp byte [esp + 0x110], bl
je 0x4476ac
cmp dword [esp + 0x134], 1
je 0x447589
mov edi, dword [esp + 0xe8]
dec edi
lea eax, [esp + 0xd4]
call fcn.00436902
movzx eax, word [eax]
push eax
call fcn.0043d229
pop ecx
test al, al
je 0x4476d7
mov eax, esi
and eax, 0x10
cmp al, 0x10
je 0x447702
cmp dword [esp + 0xec], 8
mov ebx, dword [esp + 0xd8]
jae 0x4476ef
lea ebx, [esp + 0xd8]
call fcn.004483bc
mov esi, dword [esp + 0x1c]
mov dword [esi + 0x80], eax
xor ebx, ebx
jmp 0x447706
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0xe8]
dec edi
lea eax, [esp + 0xd4]
call fcn.00436902
movzx eax, word [eax]
push eax
call fcn.0043d229
pop ecx
test al, al
je 0x44774d
cmp dword [esp + 0xec], 8
mov ecx, dword [esp + 0xd8]
jae 0x447740
lea ecx, [esp + 0xd8]
call fcn.00448625
mov dword [esi + 0x80], eax
jmp 0x4477b0
push dword [esp + 0x14]
call fcn.0040873e
pop ecx
mov dword [esi + 0x80], eax
cmp eax, ebx
jne 0x4477b0
cmp dword [esp + 0xec], 8
mov eax, dword [esp + 0xd8]
jae 0x447779
lea eax, [esp + 0xd8]
push ebx
push ebx
push 2
push ebx
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
jne 0x44784f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x80], eax
mov ebx, dword [esp + 0x14]
call fcn.00408b23
xor ebx, ebx
cmp dword [esi + 0x80], ebx
jne 0x4477d5
xor ebx, ebx
mov esi, dword [esp + 0x14]
call fcn.004084ab
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 0x80], eax
cmp eax, ebx
je 0x4474d9
mov edi, dword [esp + 0x1c]
cmp dword [edi + 0x80], 0xffffff9c
jne 0x4477e9
and dword [edi + 0x80], 0
push dword [esp + 0x20]
call fcn.00453b90
mov ebx, dword [esp + 0x18]
cmp dword [ebx + 0xe0], 0
pop ecx
je 0x447805
call fcn.00408b23
mov esi, dword [esp + 0x14]
push dword [esi + 0x30]
push dword [esi + 0x1c]
call dword [esi + 0x14]
push esi
call fcn.00454beb
add esp, 0xc
jmp 0x4478c4
je 0x447882
push ebx
lea eax, [esp + 0x3c]
push eax
push edi
push dword [esp + 0x2c]
push dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x44786b
cmp edi, dword [esp + 0x38]
jne 0x44786b
mov eax, edi
mov edi, dword [esp + 0x24]
cdq
push edx
push eax
call fcn.00441c2b
push dword [esp + 0x20]
mov eax, dword [esp + 0x18]
call fcn.004088da
mov edi, eax
cmp edi, ebx
pop ecx
jge 0x447820
mov dword [esi + 0x80], edi
jmp 0x447882
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x80], eax
cmp eax, ebx
jne 0x447882
or dword [esi + 0x80], 0xffffffff
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0xc0]
call fcn.00446fef
pop ecx
lea eax, [esp + 0x3c]
push eax
push ebx
push ebx
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4477a5
mov eax, dword [esp + 0x1c]
mov dword [eax + 0x80], 2
mov edi, eax
mov esi, dword [esp + 0x24]
xor ebx, ebx
push ebx
call fcn.00441c74
mov eax, dword [edi + 0x8c]
inc dword [eax + 0x240]
mov edi, dword [edi + 0x80]
push ebx
push 1
lea esi, [esp + 0x180]
call fcn.004095f2
push ebx
push 1
lea esi, [esp + 0x164]
call fcn.004095f2
push ebx
push 1
lea esi, [esp + 0xfc]
call fcn.004095f2
lea eax, [esp + 0xd4]
call fcn.0043b39a
lea eax, [esp + 0x13c]
call fcn.0043b39a
lea eax, [esp + 0x114]
call fcn.0043b39a
mov eax, edi
jmp 0x44795d
lea eax, [esp + 0xd4]
call fcn.0043b39a
lea eax, [esp + 0x13c]
call fcn.0043b39a
lea eax, [esp + 0x114]
call fcn.0043b39a
xor eax, eax
mov ecx, dword [esp + 0xda0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd88]
xor ecx, esp
call fcn.00453655
mov esp, ebp
pop ebp
ret