Function at 0x47fe90
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d8900
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x511070]
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 eax, ecx
mov dword [ebp - 0x58], eax
mov edi, dword [eax + 0x20]
lea ebx, [edi + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [edi + 0x20]
sub esi, dword [edi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp esi, 4
jb 0x480116
push 0xe
push str.dr_padcket.dat
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x24], 0xf
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x38], 0
call fcn.00438e80
lea eax, [ebp - 0x38]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00480140
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x24]
cmp eax, 0x10
jb 0x47ff31
inc eax
lea ecx, [ebp - 0x38]
push eax
push dword [ebp - 0x38]
call fcn.004339b0
cmp dword [ebp - 0x3c], 0x10
lea eax, [ebp - 0x50]
push 0
cmovae eax, dword [ebp - 0x50]
push 0x80
push 4
push 0
push 0
push 0xc0000000
push eax
mov dword [ebp - 0x24], 0xf
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x38], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x480101
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 0x5c], edi
cmp edi, 0x100000
jbe 0x47ff94
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x480101
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ecx
lea ecx, [ebp - 0x74]
call fcn.00481930
push 0
call fcn.004ae35d
mov ecx, dword [ebp - 0x58]
add esp, 4
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], edx
mov ecx, dword [ecx + 0x20]
call fcn.0047e120
mov esi, eax
test esi, esi
je 0x4800f2
nop
cmp dword [esi + 0xc], 0
je 0x480090
mov edx, dword [esi]
mov ecx, edx
mov eax, dword [esi + 4]
add ecx, 0x15180
mov dword [ebp - 0x68], eax
adc eax, 0
cmp dword [ebp - 0x60], eax
jg 0x480090
jl 0x480001
cmp dword [ebp - 0x64], ecx
jae 0x480090
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x74]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x70]
sub eax, ecx
mov dword [ebp - 0x20], edx
dec eax
mov word [ebp - 0x14], ax
movzx eax, word [esi + 0x40]
mov word [ebp - 0x18], ax
movzx eax, word [esi + 0x48]
mov word [ebp - 0x16], ax
lea eax, [ebp - 0x14]
push eax
push ecx
lea ecx, [esi + 0x14]
call fcn.0047ead0
test al, al
je 0x480090
push 0
lea eax, [ebp - 0x54]
push eax
push 0x10
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esi + 0x44], 0x10
lea ecx, [esi + 0x30]
jb 0x480056
mov ecx, dword [ecx]
push 0
lea eax, [ebp - 0x54]
push eax
movzx eax, word [ebp - 0x18]
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x54]
push eax
movzx eax, word [ebp - 0x14]
push eax
push dword [ebp - 0x74]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
movzx ecx, word [ebp - 0x18]
movzx eax, word [ebp - 0x14]
add eax, edi
lea edi, [ecx + 0x10]
add edi, eax
mov dword [ebp - 0x5c], edi
mov ecx, esi
call fcn.0047d650
push 0x50
push esi
call fcn.004a5035
add esp, 8
cmp edi, 0x100000
ja 0x4800f2
mov eax, dword [ebp - 0x58]
mov edi, dword [eax + 0x20]
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x1c]
xor esi, esi
cmp eax, dword [edi + 0x20]
je 0x4800dd
mov ecx, dword [edi + 0x20]
lea edx, [eax + 4]
mov esi, dword [eax]
sub ecx, edx
push ecx
push edx
push eax
call fcn.004a6690
add esp, 0xc
add dword [edi + 0x20], 0xfffffffc
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp - 0x5c]
test esi, esi
jne 0x47ffd0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x74]
call fcn.00422790
mov eax, dword [ebp - 0x3c]
cmp eax, 0x10
jb 0x480116
inc eax
lea ecx, [ebp - 0x50]
push eax
push dword [ebp - 0x50]
call fcn.004339b0
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.004a474b
mov esp, ebp
pop ebp
ret