Function at 0x477b30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57de90
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x5fb61c]
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
xor esi, esi
push 0x24
mov edi, ecx
mov dword [ebp - 0x34], esi
call fcn.0042bfa0
add esp, 4
cmp eax, esi
je 0x477d2b
mov ebx, eax
mov dword [eax], eax
mov dword [ebp - 0x38], ebx
mov dword [eax + 4], eax
mov eax, dword [edi + 0x10]
push 0xffffffffffffffff
push eax
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, esi
jne 0x477cf9
lea esi, [edi + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea edx, [ebp - 0x38]
lea ecx, [edi + 0x34]
cmp edx, ecx
je 0x477bc0
mov eax, ebx
mov ebx, dword [ecx]
mov dword [ecx], eax
mov eax, dword [ebp - 0x34]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], edx
mov dword [ecx + 4], eax
mov edi, edi
mov eax, dword [edi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x34], 0
je 0x477cdf
cmp dword [edi + 8], 0
jne 0x477bfd
mov eax, dword [edi + 0x18]
push 0x59e6a4
push eax
call fcn.00535b99
add esp, 8
mov dword [edi + 8], eax
test eax, eax
je 0x477cdf
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
mov byte [ebp - 4], 1
mov eax, dword [ebx]
push 0xffffffffffffffff
add eax, 8
push 0
push eax
lea ecx, [ebp - 0x2c]
call fcn.0042e820
mov esi, dword [ebx]
cmp esi, ebx
je 0x477c6a
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov dword [eax], ecx
mov edx, dword [esi]
mov eax, dword [esi + 4]
mov dword [edx + 4], eax
cmp dword [esi + 0x1c], 0x10
jb 0x477c4c
mov eax, dword [esi + 8]
push eax
call int.0042bfd0
add esp, 4
mov dword [esi + 0x1c], 0xf
mov dword [esi + 0x18], 0
push esi
mov byte [esi + 8], 0
call int.0042bfd0
add esp, 4
dec dword [ebp - 0x34]
cmp dword [ebp - 0x18], 0x10
mov ecx, dword [ebp - 0x2c]
jae 0x477c76
lea ecx, [ebp - 0x2c]
mov eax, dword [edi + 8]
test eax, eax
je 0x477c9f
mov edx, dword [ebp - 0x1c]
push eax
push edx
push 1
push ecx
call fcn.00535d07
mov eax, dword [edi + 8]
push eax
push 2
push 1
push 0x59e6a0
call fcn.00535d07
add esp, 0x20
cmp dword [ebp - 0x34], 0
jne 0x477c13
mov eax, dword [edi + 8]
test eax, eax
je 0x477cc0
push eax
call fcn.00536288
add esp, 4
mov dword [edi + 8], 0
cmp dword [ebp - 0x18], 0x10
mov byte [ebp - 4], 0
jb 0x477b95
mov ecx, dword [ebp - 0x2c]
push ecx
call int.0042bfd0
add esp, 4
jmp 0x477b95
cmp dword [edi + 4], 0
jne 0x477cf9
mov edx, dword [edi + 0x10]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x477b95
lea ecx, [ebp - 0x38]
call fcn.004777e0
mov eax, dword [ebp - 0x38]
push eax
call int.0042bfd0
add esp, 4
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.005332ca
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x3c]
push ecx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x3c], esi
call fcn.005348e5
push 0x5d65a8
lea edx, [ebp - 0x48]
push edx
mov dword [ebp - 0x48], vtable.std::bad_alloc.0
call fcn.00533e7f
int3