Function at 0x470d50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x521998
mov eax, dword fs:[0]
push eax
sub esp, 0x710
mov eax, dword [0x589560]
xor eax, esp
mov dword [esp + 0x708], eax
push ebx
push esi
push edi
mov eax, dword [0x589560]
xor eax, esp
push eax
lea eax, [esp + 0x720]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
call fcn.00473c80
cmp byte [eax + 0x128], 0
je 0x470dae
add eax, 0x18
jmp 0x470db1
mov eax, dword [eax + 0x14]
lea esi, [eax + 4]
xor edi, edi
cmp esi, edi
je 0x4711d6
cmp word [esi], di
je 0x4711d6
lea ecx, [esp + 0x14c]
call fcn.0046a650
mov eax, esi
lea edx, [esp + 0x14c]
mov dword [esp + 0x728], edi
call fcn.0046a7f0
push edi
push edi
push edi
push edi
push edi
push str.ErrorLog
lea ecx, [esp + 0x3c]
call fcn.0046da80
cmp byte [esp + 0x140], 0
lea eax, [esp + 0x30]
jne 0x470e0d
mov eax, dword [esp + 0x2c]
cmp word [eax + 4], 0x2e
lea esi, [esp + 0x14c]
jne 0x470e26
lea ecx, [esp + 0x24]
call fcn.0046ed90
jmp 0x470e2f
lea eax, [esp + 0x24]
call fcn.0046e110
cmp byte [esp + 0x140], 0
mov dword [esp + 0x24], vtable.t_str.0
jne 0x470e56
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x30]
cmp eax, edx
je 0x470e56
push eax
call fcn.004fdda1
add esp, 4
lea ecx, [esp + 0x14c]
mov dword [esp + 0x728], 1
call fcn.0046e330
test al, al
jne 0x470ec3
mov byte [esp + 0x18], al
mov dword [esp + 0x14], edi
push edi
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x154]
mov byte [esp + 0x730], 2
call fcn.0046ee80
test al, al
jne 0x470eae
lea ecx, [esp + 0x14]
call fcn.00470870
lea ecx, [esp + 0x14]
call fcn.004707c0
jmp 0x4711ca
lea eax, [esp + 0x14c]
call fcn.0046ffe0
lea ecx, [esp + 0x14]
call fcn.004707c0
push edi
call fcn.004fe0eb
add esp, 4
lea ecx, [esp + 0x39c]
mov esi, eax
mov ebx, edx
call fcn.0046a650
push str._Y__M__D
push ebx
push esi
lea eax, [esp + 0x3a8]
call fcn.0046af70
cmp byte [esp + 0x4b8], 0
lea eax, [esp + 0x3a8]
jne 0x470f07
mov eax, dword [esp + 0x3a4]
lea ecx, [esp + 0x274]
lea esi, [eax + 4]
call fcn.0046a650
cmp byte [esp + 0x268], 0
lea eax, [esp + 0x158]
jne 0x470f2e
mov eax, dword [esp + 0x154]
add eax, 4
lea edx, [esp + 0x274]
call fcn.0046a7f0
cmp esi, edi
je 0x470fb0
lea ecx, [esp + 0x24]
call fcn.0046a650
mov eax, esi
lea edx, [esp + 0x24]
call fcn.0046a7f0
cmp byte [esp + 0x140], 0
lea eax, [esp + 0x30]
jne 0x470f67
mov eax, dword [esp + 0x2c]
cmp word [eax + 4], 0x2e
lea esi, [esp + 0x274]
jne 0x470f80
lea ecx, [esp + 0x24]
call fcn.0046ed90
jmp 0x470f89
lea eax, [esp + 0x24]
call fcn.0046e110
cmp byte [esp + 0x140], 0
mov dword [esp + 0x24], vtable.t_str.0
jne 0x470fb0
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x30]
cmp eax, ecx
je 0x470fb0
push eax
call fcn.004fdda1
add esp, 4
mov bl, 0xa
lea ecx, [esp + 0x274]
mov byte [esp + 0x728], bl
call fcn.0046e330
test al, al
jne 0x471022
mov byte [esp + 0x18], al
mov dword [esp + 0x14], edi
push edi
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x27c]
mov byte [esp + 0x730], 0xb
call fcn.0046ee80
test al, al
jne 0x471006
lea ecx, [esp + 0x14]
call fcn.00470870
lea ecx, [esp + 0x14]
call fcn.004707c0
jmp 0x4711b2
lea eax, [esp + 0x274]
call fcn.0046ffe0
lea ecx, [esp + 0x14]
mov byte [esp + 0x728], bl
call fcn.004707c0
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
push edi
push edi
push edi
push str..log
push eax
lea ecx, [esp + 0x288]
push ecx
lea ecx, [esp + 0x4dc]
mov byte [esi + 4], 0
call fcn.0046dd20
cmp byte [esp + 0x5e0], 0
lea eax, [esp + 0x4d0]
jne 0x471063
mov eax, dword [esp + 0x4cc]
push edi
push 0x80
push 4
push edi
push edi
push 4
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x471186
push 1
push ebx
call fcn.00476c30
push 1
push ebx
call fcn.00476c80
add esp, 0x10
push 2
push edi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x471186
cmp eax, edi
jne 0x4710dc
push edi
lea edx, [esp + 0x18]
push edx
push 2
lea eax, [esp + 0x28]
push eax
push ebx
mov byte [esp + 0x30], 0xff
mov byte [esp + 0x31], 0xfe
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x14], 2
jne 0x471186
lea ecx, [esp + 0x5ec]
call fcn.0046a650
push esi
lea edi, [esp + 0x5f0]
call fcn.00470af0
lea ecx, [esp + 0x24]
call fcn.0046a650
push 0x563568
push 0
call fcn.004fe0eb
add esp, 4
push edx
push eax
lea eax, [esp + 0x30]
call fcn.0046af70
mov ecx, edi
call fcn.0046adb0
mov edi, eax
mov eax, 0x563564
lea esi, [esp + 0x24]
call fcn.0046ad90
mov esi, eax
mov eax, edi
call fcn.0046ad90
mov esi, eax
mov eax, 0x550c44
call fcn.0046ad90
mov esi, dword [esp + 0x28]
push 0
lea ecx, [esp + 0x18]
push ecx
add esi, esi
push esi
lea eax, [esp + 0x30]
mov dword [esp + 0x20], 0
call fcn.0046add0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x14], esi
lea ecx, [esp + 0x24]
je 0x47118e
call fcn.0046dfd0
lea ecx, [esp + 0x5ec]
call fcn.0046dfd0
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4711a6
call fcn.0046dfd0
lea ecx, [esp + 0x5ec]
call fcn.0046dfd0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x4c4]
call fcn.0046dfd0
lea ecx, [esp + 0x274]
call fcn.0046dfd0
lea ecx, [esp + 0x39c]
call fcn.0046dfd0
lea ecx, [esp + 0x14c]
call fcn.0046dfd0
mov ecx, dword [esp + 0x720]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x708]
xor ecx, esp
call fcn.004fe05a
mov esp, ebp
pop ebp
ret 4