Function at 0x49f610
Capabilities:
Copy file
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x288
mov eax, dword [0x51e080]
xor eax, esp
mov dword [esp + 0x284], eax
push esi
mov esi, ecx
push edi
mov dword [esp + 0x34], esi
lea eax, [esi + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
imul edi, dword [esi + 0x8c], 0x58
lea edx, [esi + 0x58]
mov eax, 4
mov dword [esp + 0x30], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], edi
mov ecx, dword [edx]
test ecx, ecx
je 0x49f675
nop dword [eax]
mov eax, dword [ecx + 0x78]
mov ecx, dword [ecx + 0x14]
lea edi, [edi + eax*2]
test ecx, ecx
jne 0x49f660
mov eax, dword [esp + 0x18]
mov dword [esp + 0x20], edi
add edx, 4
sub eax, 1
mov dword [esp + 0x18], eax
jne 0x49f657
mov eax, dword [esi + 0x90]
add eax, dword [esi + 0x94]
mov ecx, dword [esi + 0xe8]
cmp eax, ecx
mov edx, ecx
cmovae edx, eax
mov eax, 0x80
cmp edx, eax
cmova edx, eax
mov eax, edx
sub eax, ecx
mov dword [esp + 0x24], eax
lea eax, [edx + edx*2]
shl eax, 3
mov dword [esp + 0x2c], eax
add eax, 0x1c
add eax, edi
mov ecx, eax
mov dword [esp + 0x1c], eax
and ecx, 0xf
je 0x49f6d9
mov edx, 0x10
sub edx, ecx
add eax, edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x1c], eax
jmp 0x49f6e1
mov dword [esp + 0x28], 0
push eax
call fcn.004d9a7e
mov dword [esp + 0x1c], eax
add esp, 4
mov eax, dword [esp + 0x1c]
add eax, 0x40
mov dword [esp + 0x38], eax
push eax
call fcn.004d9a7e
mov esi, dword [esi + 0x28]
add esp, 4
mov dword [esp + 0x14], eax
lea edi, [esi + 4]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x10
push dword [esp + 0x1c]
mov ecx, esi
call fcn.004b0e10
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [esp + 0x18]
mov ecx, 4
mov eax, dword [esp + 0x20]
mov dword [esp + 0x20], ecx
mov dword [esi + 0x14], eax
mov eax, dword [esp + 0x30]
mov dword [esi + 0x10], 0xc36ed903
add esi, 0x18
nop dword [eax]
mov edi, dword [eax]
test edi, edi
je 0x49f7c8
nop word [eax + eax]
movups xmm0, xmmword [edi + 0x4c]
movups xmmword [esi], xmm0
movups xmm0, xmmword [edi + 0x5c]
movups xmmword [esi + 0x10], xmm0
movups xmm0, xmmword [edi + 0x6c]
movups xmmword [esi + 0x20], xmm0
movups xmm0, xmmword [edi + 0x7c]
movups xmmword [esi + 0x30], xmm0
movups xmm0, xmmword [edi + 0x8c]
movups xmmword [esi + 0x40], xmm0
movq xmm0, qword [edi + 0x9c]
movq qword [esi + 0x50], xmm0
add esi, 0x58
mov eax, dword [edi + 0x78]
test eax, eax
je 0x49f7b9
add eax, eax
push eax
push dword [edi + 0xa4]
push esi
call fcn.004d6950
mov eax, dword [edi + 0x78]
add esp, 0xc
lea esi, [esi + eax*2]
mov edi, dword [edi + 0x14]
test edi, edi
jne 0x49f760
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x20]
add eax, 4
sub ecx, 1
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], ecx
jne 0x49f750
mov edx, dword [esp + 0x34]
xor ecx, ecx
mov eax, dword [esp + 0x2c]
mov dword [esi], eax
add esi, 4
mov eax, dword [edx + 0xec]
cmp dword [edx + 0xe8], ecx
jbe 0x49f820
nop dword [eax]
movups xmm0, xmmword [eax + 0x58]
inc ecx
movups xmmword [esi], xmm0
movq xmm0, qword [eax + 0x68]
movq qword [esi + 0x10], xmm0
add esi, 0x18
mov eax, dword [eax + 0x1c]
cmp ecx, dword [edx + 0xe8]
jb 0x49f800
mov eax, dword [esp + 0x24]
xor edi, edi
mov ecx, dword [edx + 0xf8]
test eax, eax
je 0x49f8a4
test ecx, ecx
je 0x49f8a4
cmp dword [ecx + 0x24], 0
jne 0x49f89d
mov eax, dword [edx + 0xf0]
test eax, eax
jne 0x49f84c
mov dword [edx + 0xec], ecx
jmp 0x49f84f
mov dword [eax + 0x1c], ecx
mov eax, dword [edx + 0xf0]
mov dword [ecx + 0x18], eax
mov dword [ecx + 0x1c], 0
mov dword [edx + 0xf0], ecx
mov dword [ecx + 0x24], 1
inc dword [edx + 0xe8]
test edi, edi
jne 0x49f884
cmp dword [edx + 0xf4], edi
jne 0x49f884
mov dword [edx + 0xf4], ecx
movups xmm0, xmmword [ecx + 0x58]
mov eax, dword [esp + 0x24]
movups xmmword [esi], xmm0
movq xmm0, qword [ecx + 0x68]
movq qword [esi + 0x10], xmm0
add esi, 0x18
inc edi
mov ecx, dword [ecx + 0x2c]
cmp edi, eax
jb 0x49f830
mov edi, dword [edx + 0x28]
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [esp + 0x28]
mov ecx, edi
push esi
call fcn.004b0e10
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x34]
test eax, eax
je 0x49f969
lea ecx, [esp + 0x40]
mov dword [esp + 0x40], 0xffffffff
push ecx
push dword [esp + 0x20]
mov ecx, dword [esi + 0x20]
push eax
mov dword [esp + 0x50], 0xffffffff
mov dword [esp + 0x54], 0xffffffff
mov dword [esp + 0x58], 0xffffffff
mov dword [esp + 0x5c], 0xffffffff
mov dword [esp + 0x60], 0xffffffff
mov dword [esp + 0x64], 0xffffffff
mov dword [esp + 0x68], 0xffffffff
call fcn.004b1300
xor dword [esp + 0x40], 0x81e6b3f
xor dword [esp + 0x44], 0x569ed9b
xor dword [esp + 0x48], 0x2cd5d85
xor dword [esp + 0x4c], 0x674b7466
xor dword [esp + 0x50], 0x2d027638
xor dword [esp + 0x54], 0x5b299276
xor dword [esp + 0x58], 0xb671f6d
xor dword [esp + 0x5c], 0x52453c93
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
movups xmm0, xmmword [esp + 0x40]
mov esi, dword [esi + 0x28]
movups xmmword [ecx + eax], xmm0
movups xmm0, xmmword [esp + 0x50]
lea edi, [esi + 4]
push edi
movups xmmword [ecx + eax + 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esp + 0x14]
mov ecx, esi
mov eax, dword [esp + 0x1c]
add edx, 0x20
push 0x20
add eax, edx
push eax
call fcn.004b0e10
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x9c4
call fcn.004d3886
mov ecx, dword [esp + 0x18]
add esp, 4
mov esi, dword [esp + 0x1c]
mov edi, eax
add ecx, 0x20
mov dword [esp + 0x2c], edi
add esi, ecx
mov ecx, edi
push 8
push esi
mov dword [edi + 0x9c0], 0x271
call fcn.004b42f0
mov ecx, edi
call fcn.00409ee0
mov dword [esp + 0x2c], eax
mov ecx, edi
mov eax, dword [esi]
mov dword [esp + 0x28], eax
call fcn.00409ee0
mov ecx, dword [esi + 0x1c]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x26c], ecx
mov ecx, edi
mov dword [esp + 0x20], eax
call fcn.00409ee0
mov dword [esp + 0x270], eax
mov ecx, dword [esi + 8]
mov dword [esp + 0x274], ecx
mov ecx, edi
call fcn.00409ee0
mov ecx, edi
mov esi, eax
call fcn.00409ee0
xor eax, esi
mov esi, dword [esp + 0x14]
add esi, dword [esp + 0x1c]
mov ecx, dword [esi + 0x2c]
xor ecx, eax
mov dword [esp + 0x278], ecx
mov ecx, edi
mov eax, dword [esi + 0x38]
xor eax, dword [esi + 0x30]
mov dword [esp + 0x27c], eax
call fcn.00409ee0
mov ecx, edi
mov dword [esp + 0x280], eax
call fcn.00409ee0
mov ecx, dword [esi + 0x34]
xor ecx, eax
mov dword [esp + 0x284], ecx
mov ecx, edi
call fcn.00409ee0
push 0x9c4
push edi
mov dword [esp + 0x290], eax
call fcn.004d38b6
add esp, 8
lea eax, [esp + 0x26c]
mov edi, dword [esp + 0x34]
push eax
push 0x20
lea eax, [esp + 0x68]
mov ecx, dword [edi + 0x24]
push eax
call fcn.004b48f0
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
mov esi, dword [edi + 0x24]
mov dword [esp + 0x240], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x244], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x248], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24c], eax
test edx, edx
je 0x49fb5c
cmp dword [esp + 0x14], 0
je 0x49fb5c
mov eax, dword [esp + 0x260]
cmp eax, 0xa
je 0x49fb07
cmp eax, 0xc
je 0x49fb07
cmp eax, 0xe
jne 0x49fb5c
mov ecx, dword [esp + 0x1c]
test cl, 0xf
jne 0x49fb5c
shr ecx, 4
sub eax, 0xa
je 0x49fb4a
sub eax, 2
je 0x49fb36
sub eax, 2
jne 0x49fb5c
push ecx
push dword [esp + 0x18]
lea eax, [esp + 0x68]
mov ecx, esi
push edx
push eax
call fcn.004b6710
jmp 0x49fb5c
push ecx
push dword [esp + 0x18]
lea eax, [esp + 0x68]
mov ecx, esi
push edx
push eax
call fcn.004b7580
jmp 0x49fb5c
push ecx
push dword [esp + 0x18]
lea eax, [esp + 0x68]
mov ecx, esi
push edx
push eax
call fcn.004b8200
lea eax, [edi + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [edi + 0x2c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x49fbbb
push dword [esp + 0x18]
call fcn.004d9a63
add esp, 4
push dword [esp + 0x14]
call fcn.004d9a63
add esp, 4
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0x284]
xor ecx, esp
call fcn.004d3878
mov esp, ebp
pop ebp
ret 4
push 0
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x40]
push dword [esp + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x18]
call fcn.004d9a63
add esp, 4
push dword [esp + 0x14]
call fcn.004d9a63
add esp, 4
cmp dword [ebp + 8], 0
je 0x49fc27
mov ecx, dword [edi + 0x114]
lea eax, [esp + 0x38]
push eax
mov edx, str.perfect_dark.sekai
call fcn.00495800
mov esi, dword [esp + 0x3c]
add esp, 4
push 0
push esi
push dword [edi + 0x2c]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push esi
call fcn.004d9a63
add esp, 4
mov esi, dword [edi + 0x118]
lea edi, [esi + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x28], 0
lea eax, [esi + 0x28]
je 0x49fc5c
push 0x18
push eax
mov eax, dword [esi + 4]
push 0xf827928a
mov ecx, dword [eax + 0x4d8]
mov ecx, dword [ecx + 0xb8]
call fcn.00471a70
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x28c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.004d3878
mov esp, ebp
pop ebp
ret 4