Function at 0x476251
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x537b25
mov eax, dword fs:[0]
push eax
mov eax, 0x4350
call fcn.00461750
mov eax, dword [0x57b300]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x4358], ebx
mov edi, dword [ebp + 0xc]
lea esi, [ebx + 0x340]
push esi
mov dword [ebp - 0x4350], edi
mov dword [ebp - 0x435c], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x434c], eax
inc ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
cmp eax, 3
je 0x4762d3
cmp eax, 2
je 0x4762ca
cmp eax, ecx
jne 0x476398
cmp eax, 3
jne 0x47637c
mov ecx, dword [ebp + 8]
cmp ecx, dword [ebx + 4]
je 0x476336
cmp dword [ebx + 4], 0xffffffff
je 0x4762ec
push dword [ebx]
call fcn.00478b82
pop ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ebx]
or dword [ebx + 4], 0xffffffff
cmp ecx, dword [eax + 4]
jge 0x476398
cmp dword [eax + 0x10], ecx
jle 0x47630f
push eax
call fcn.00478c0b
mov eax, dword [ebx]
pop ecx
mov ecx, dword [ebp + 8]
cmp dword [eax + 0x10], ecx
jge 0x476329
mov esi, dword [ebp + 8]
push dword [ebx]
call fcn.00478c4a
mov eax, dword [ebx]
pop ecx
cmp dword [eax + 0x10], esi
jl 0x476314
lea esi, [ebx + 0x340]
push eax
call fcn.00478d94
mov eax, dword [ebp + 8]
pop ecx
mov dword [ebx + 4], eax
push dword [ebp + 0x10]
push edi
push dword [ebx]
call fcn.00478fef
mov edi, eax
add esp, 0xc
test edi, edi
jle 0x476359
mov dword [ebp - 0x434c], 0x600
jmp 0x476634
push dword [ebx]
call fcn.00478b82
or dword [ebx + 4], 0xffffffff
pop ecx
test edi, edi
je 0x476643
mov dword [ebp - 0x434c], 0x5000000
jmp 0x476634
cmp dword [ebx + 4], 0xffffffff
je 0x47638a
push dword [ebx]
call fcn.00478b82
pop ecx
mov ecx, dword [ebx]
or dword [ebx + 4], 0xffffffff
mov eax, dword [ebp + 8]
cmp eax, dword [ecx + 4]
jl 0x4763a7
mov dword [ebp - 0x434c], 0x10000
jmp 0x476634
cmp dword [ecx + 0x10], eax
jle 0x4763bb
push ecx
call fcn.00478c0b
mov eax, dword [ebp + 8]
pop ecx
mov ecx, dword [ebx]
cmp dword [ecx + 0x10], eax
jge 0x4763d8
mov esi, dword [ebp + 8]
push dword [ebx]
call fcn.00478c4a
mov eax, dword [ebx]
pop ecx
cmp dword [eax + 0x10], esi
jl 0x4763c0
mov eax, dword [ebp + 8]
lea esi, [ebx + 0x340]
lea ecx, [ebp - 0x4344]
push ecx
push eax
mov ecx, ebx
call fcn.00475c72
test byte [ebp - 0x423c], 0x10
je 0x476437
xor ecx, ecx
inc ecx
cmp dword [ebp + 0x14], ecx
je 0x476634
push 0x103
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x4340]
push eax
call fcn.00476115
lea eax, [ebp - 0x218]
push eax
lea eax, [ebx + 0x138]
push eax
call fcn.00475a15
add esp, 0x14
xor eax, eax
mov dword [ebp - 0x434c], eax
jmp 0x476634
xor eax, eax
inc eax
cmp dword [ebp + 0x14], eax
je 0x476572
movzx eax, word [edi]
mov ecx, edi
mov edx, edi
test ax, ax
je 0x476557
push 0x2f
pop ebx
push 0x5c
mov esi, eax
pop edi
cmp si, bx
je 0x476465
cmp si, di
jne 0x476468
lea ecx, [edx + 2]
add edx, 2
movzx eax, word [edx]
mov esi, eax
test ax, ax
jne 0x47645b
mov ebx, dword [ebp - 0x4358]
mov edi, dword [ebp - 0x4350]
mov dword [ebp - 0x4354], ecx
lea esi, [ebx + 0x340]
cmp ecx, edi
je 0x476557
lea eax, [ebp - 0x218]
push edi
push eax
call fcn.00508513
mov eax, dword [ebp - 0x4354]
sub eax, edi
sar eax, 1
pop ecx
pop ecx
lea eax, [eax*2 - 2]
cmp eax, 0x208
jae 0x476668
xor ecx, ecx
mov word [ebp + eax - 0x218], cx
push 0x2f
pop eax
cmp word [ebp - 0x218], ax
je 0x4764f4
push 0x5c
pop eax
cmp word [ebp - 0x218], ax
je 0x4764f4
cmp word [ebp - 0x216], 0x3a
je 0x4764f4
mov byte [ebp - 0x4345], cl
jmp 0x4764fd
xor eax, eax
inc eax
mov byte [ebp - 0x4345], al
lea eax, [ebp - 0x218]
push 0x54a294
push eax
call fcn.004ee2df
mov edi, eax
lea eax, [ebp - 0x218]
push 0x54a29c
push eax
call fcn.004ee2df
movzx ecx, byte [ebp - 0x4345]
add esp, 0x10
test eax, eax
setne dl
test edi, edi
push 1
pop eax
cmovne ecx, eax
or dl, cl
jne 0x476551
lea eax, [ebp - 0x218]
push eax
lea eax, [ebx + 0x138]
push eax
call fcn.00475a15
pop ecx
pop ecx
mov edi, dword [ebp - 0x4350]
xor eax, eax
push eax
push dword [ebp - 0x423c]
push 2
push eax
push eax
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x476586
mov dword [ebp - 0x434c], 0x200
jmp 0x476634
push dword [ebx]
call fcn.00478d94
mov dword [esp], 0x4000
jmp 0x4765b9
je 0x4765d7
push 0
lea ecx, [ebp - 0x4358]
push ecx
push eax
lea eax, [ebp - 0x4218]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4765ce
push 0x4000
lea eax, [ebp - 0x4218]
push eax
push dword [ebx]
call fcn.00478fef
add esp, 0xc
test eax, eax
jns 0x476596
xor eax, eax
inc eax
mov byte [ebp - 0x434c], al
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
xor ecx, ecx
inc ecx
cmp eax, ecx
jne 0x47660a
cmp byte [ebp - 0x434c], 0
jne 0x47660a
lea eax, [ebp - 0x4228]
push eax
lea eax, [ebp - 0x4238]
push eax
lea eax, [ebp - 0x4230]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
xor eax, eax
inc eax
cmp dword [ebp + 0x14], eax
je 0x476619
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebx]
call fcn.00478b82
cmp byte [ebp - 0x434c], 0
pop ecx
je 0x476643
mov dword [ebp - 0x434c], 0x400
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x434c]
jmp 0x47664c
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046170f
leave
ret 0x10
call fcn.00461bac
int3