Function at 0x476bb0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x10c
push ebx
push ebp
mov ebp, dword [esp + 0x124]
push esi
mov esi, dword [esp + 0x11c]
push edi
test esi, esi
je 0x476db6
mov bx, word [esp + 0x134]
test bx, bx
je 0x476db6
cmp word [esp + 0x130], 4
jne 0x476db6
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
mov ecx, dword [0x826818]
push esi
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.0044baf0
test eax, eax
je 0x476c49
mov al, byte [esi + 0xec]
cmp al, 0x20
movsx esi, al
jne 0x476c27
mov esi, 0x1f
push 4
call fcn.00476a30
mov ecx, dword [0x73aaac]
add esp, 4
push eax
mov eax, dword [esp + 0x124]
push eax
push esi
push ecx
push 0x6a14dc
jmp 0x476c72
push 4
call fcn.00476a30
add esp, 4
push eax
mov eax, dword [esp + 0x128]
push esi
push eax
call fcn.00476a10
mov ecx, dword [0x73aaac]
add esp, 4
push eax
push ecx
push 0x6a14cc
lea edx, [esp + 0x30]
push edx
call dword [fcn.0065f1cc]
mov edi, dword [fcn.0065f1e8]
add esp, 0x18
lea eax, [esp + 0x1c]
push 0x40
push 0x6a0008
push eax
call edi
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x476cb8
push 0x40
lea ecx, [esp + 0x20]
push 0x69a9ec
push ecx
call edi
mov esi, eax
add esp, 0xc
test esi, esi
je 0x476db6
push esi
push 1
lea edx, [esp + 0x18]
push 4
push edx
xor edi, edi
call dword [fcn.0065f1bc]
add esp, 0x10
cmp eax, 1
jne 0x476ce1
mov edi, dword [esp + 0x10]
cmp di, 0x3e8
je 0x476dac
cmp bx, 0x3e8
jne 0x476d41
push 0
push 0
push esi
call dword [fcn.0065f1d4]
mov edi, dword [fcn.0065f1b4]
push esi
push 1
lea eax, [esp + 0x24]
push 4
push eax
mov word [esp + 0x2e], 0
mov word [esp + 0x2c], bx
call edi
mov ecx, dword [esp + 0x144]
push esi
push ebp
push 0x20
push ecx
call edi
mov edx, ebp
add esp, 0x2c
shl edx, 5
add edx, 4
push edx
push esi
call dword [0x65f194]
add esp, 4
push eax
call dword [0x65f198]
add esp, 8
jmp 0x476dac
movsx eax, di
movsx ecx, bx
inc eax
cmp ecx, eax
jne 0x476dac
mov ebx, dword [fcn.0065f1d4]
push 0
push 0
push esi
call ebx
mov eax, dword [0x6a2ce4]
add esp, 0xc
cmp ebp, eax
mov word [esp + 0x12], 0
jge 0x476d75
mov word [esp + 0x10], 0x3e8
jmp 0x476d82
mov dx, word [esp + 0x134]
mov word [esp + 0x10], dx
mov edi, dword [fcn.0065f1b4]
push esi
push 1
lea eax, [esp + 0x18]
push 4
push eax
call edi
push 2
push 0
push esi
call ebx
mov ecx, dword [esp + 0x144]
push esi
push ebp
push 0x20
push ecx
call edi
add esp, 0x2c
push esi
call dword [fcn.0065f1c0]
add esp, 4
mov eax, dword [0x8267c4]
test eax, eax
je 0x476fab
test ebp, ebp
jle 0x476fab
cmp word [esp + 0x130], 4
jne 0x476fab
mov edi, dword [esp + 0x120]
mov esi, 0x6a0184
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x476e10
test cl, cl
je 0x476e0c
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x476e10
add eax, 2
add esi, 2
test cl, cl
jne 0x476de8
xor eax, eax
jmp 0x476e15
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x476e26
cmp byte [edi + 0xec], 1
je 0x476fab
mov ebx, ebp
shl ebx, 5
push ebx
mov dword [esp + 0x18], ebx
call fcn.00643b70
add esp, 4
mov edi, eax
test ebp, ebp
mov dword [esp + 0x10], edi
jle 0x476e67
mov edx, dword [esp + 0x128]
mov ebx, ebp
sub edx, edi
lea esi, [edx + eax]
mov edi, eax
mov ecx, 8
add eax, 0x20
dec ebx
rep movsd dword es:[edi], dword [esi]
jne 0x476e4d
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x120]
push eax
movsx ax, byte [eax + 0xec]
push eax
call fcn.004782e0
mov ecx, dword [esp + 0x128]
mov esi, eax
push ecx
mov dword [esp + 0x24], esi
call fcn.00472c00
sub ax, 3
add esp, 0xc
neg ax
sbb eax, eax
and eax, 0xfffffc7c
add eax, 0x3e8
cmp si, 5
mov dword [esp + 0x10], eax
je 0x476eb6
cmp si, 0x10
jne 0x476ebe
mov dword [esp + 0x10], 0x64
test ebp, ebp
jle 0x476f25
fild dword [esp + 0x10]
lea esi, [edi + 0x10]
mov ebx, ebp
fld dword [esi - 0xc]
fmul st(1)
fadd qword [0x65f9a0]
call fcn.00645030
mov dword [esi - 0xc], eax
fld dword [esi]
fmul st(1)
fadd qword [0x65f9a0]
call fcn.00645030
mov dword [esi], eax
fld dword [esi - 8]
fmul st(1)
fadd qword [0x65f9a0]
call fcn.00645030
mov dword [esi - 8], eax
fld dword [esi - 4]
fmul st(1)
fadd qword [0x65f9a0]
call fcn.00645030
mov dword [esi - 4], eax
add esi, 0x20
dec ebx
jne 0x476ecb
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
fstp st(0)
cmp si, 6
je 0x476f31
cmp si, 0x11
jne 0x476f7c
xor ecx, ecx
test ebp, ebp
jle 0x476f7c
lea eax, [edi + 0x10]
mov edx, 0x131a35f
cmp dword [eax - 0x10], edx
jge 0x476f7c
fld dword [eax - 0xc]
fmul dword [0x665d54]
inc ecx
add eax, 0x20
cmp ecx, ebp
fstp dword [eax - 0x2c]
fld dword [eax - 0x20]
fmul dword [0x665d54]
fstp dword [eax - 0x20]
fld dword [eax - 0x28]
fmul dword [0x665d54]
fstp dword [eax - 0x28]
fld dword [eax - 0x24]
fmul dword [0x665d54]
fstp dword [eax - 0x24]
jl 0x476f3f
mov edx, dword [ebx + edi - 0x20]
mov eax, dword [0x826828]
cmp edx, eax
jl 0x476f8a
dec ebp
test ebp, ebp
jle 0x476fa2
mov eax, dword [esp + 0x120]
push 4
push ebp
push edi
push eax
call fcn.00478f00
add esp, 0x10
push edi
call fcn.00643cfc
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret