Function at 0x40bb40
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4d05a8
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x553abc]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov ebx, ecx
mov ecx, 0x5553c8
call fcn.00405520
mov ecx, dword [0x5553c4]
push 0xff
call fcn.00405630
mov byte [esp + 0x17], al
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
mov ecx, ebx
call edx
mov ecx, dword [eax + 4]
xor edi, edi
cmp ecx, edi
jne 0x40bb9d
xor ebp, ebp
jmp 0x40bba2
mov ebp, dword [eax + 8]
sub ebp, ecx
mov dword [esp + 0x2c], vtable.yaneuraoGameSDK3rd::YTL::smart_ptr_unsigned_char_.0
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edi
lea eax, [ebp + 1]
push eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x4c], edi
mov dword [esp + 0x20], eax
call fcn.00407200
push edi
lea ecx, [esp + 0x30]
call fcn.004438c0
mov cl, byte [esp + 0x17]
xor esi, esi
cmp ebp, edi
mov byte [eax], cl
jle 0x40bc25
mov edx, dword [ebx]
mov eax, dword [edx + 0x14]
mov ecx, ebx
call eax
mov edi, eax
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x40bc00
mov eax, dword [edi + 8]
sub eax, ecx
cmp esi, eax
jb 0x40bc05
call fcn.004b899b
mov edi, dword [edi + 4]
add edi, esi
add esi, 1
push esi
lea ecx, [esp + 0x30]
call fcn.004438c0
mov cl, byte [edi]
xor cl, byte [esp + 0x17]
cmp esi, ebp
mov byte [eax], cl
jl 0x40bbe5
xor edi, edi
lea ecx, [esp + 0x20]
call fcn.00403df0
mov esi, dword [0x531024]
mov edx, 0x4edf10
shr edx, 0x10
mov byte [esp + 0x48], 1
mov dword [esp + 0x18], esi
jne 0x40bc83
mov eax, 0x4edf10
movzx eax, ax
push eax
lea ecx, [esp + 0x1c]
call fcn.00401c90
mov esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x50]
mov eax, dword [ebp]
push esi
push eax
lea ecx, [esp + 0x2c]
push ecx
mov byte [esp + 0x54], 2
call fcn.004b94f3
add esp, 0xc
cmp eax, edi
je 0x40bcc1
mov eax, 1
jmp 0x40bccd
push 0x4edf10
call dword [0x4ed1d8]
mov ebp, eax
cmp ebp, edi
je 0x40bc5d
push ebp
lea ecx, [esp + 0x1c]
call fcn.004015d0
test eax, eax
je 0x40bc59
mov esi, dword [esp + 0x18]
push ebp
push 0x4edf10
add ebp, 1
push ebp
push esi
call fcn.004b7fea
push eax
call fcn.00401470
add esp, 0x14
jmp 0x40bc5d
push ebp
lea ecx, [esp + 0x2c]
call fcn.00403d70
xor eax, eax
mov ebp, dword [0x4ed26c]
cmp eax, 1
lea edx, [esi - 0xc]
sete bl
cmp edx, dword [0x531020]
mov byte [esp + 0x48], 1
je 0x40bcfc
add esi, 0xfffffff4
push esi
call ebp
test eax, eax
jg 0x40bcfc
push esi
call fcn.004b7e1e
add esp, 4
test bl, bl
je 0x40bd62
mov eax, dword [esp + 0x24]
cmp eax, edi
mov dword [esp + 0x20], vtable.CFileStream.0
je 0x40bd19
push eax
call fcn.004b8dea
add esp, 4
mov eax, dword [esp + 0x28]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x531020]
je 0x40bd42
add eax, 0xfffffff4
push eax
call ebp
test eax, eax
jg 0x40bd42
mov eax, dword [esp + 0x28]
add eax, 0xfffffff4
push eax
call fcn.004b7e1e
add esp, 4
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20], vtable.IFile.0
mov dword [esp + 0x48], 0xffffffff
call fcn.00405d60
mov eax, 1
jmp 0x40bdde
push edi
lea ecx, [esp + 0x30]
call fcn.004438c0
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
push edx
push 1
push ecx
push eax
call fcn.004b8cf6
mov eax, dword [esp + 0x34]
add esp, 0x10
cmp eax, edi
mov dword [esp + 0x20], vtable.CFileStream.0
je 0x40bd9a
push eax
call fcn.004b8dea
add esp, 4
mov eax, dword [esp + 0x28]
lea edx, [eax - 0xc]
cmp edx, dword [0x531020]
je 0x40bdc3
add eax, 0xfffffff4
push eax
call ebp
test eax, eax
jg 0x40bdc3
mov eax, dword [esp + 0x28]
add eax, 0xfffffff4
push eax
call fcn.004b7e1e
add esp, 4
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20], vtable.IFile.0
mov dword [esp + 0x48], 0xffffffff
call fcn.00405d60
xor eax, eax
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 4