Function at 0x414c10
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffc24
push esi
push edi
mov dword [ebp - 0x3c], eax
mov eax, 0x4ccfc8
call fcn.004b9cc0
mov edx, dword [0x4cb947]
mov dword [ebp - 0x44], edx
mov dl, byte [0x4cb94b]
mov byte [ebp - 0x40], dl
mov cx, word [0x4cb94c]
mov word [ebp - 0x47], cx
mov esi, 0x4cb94e
lea edi, [ebp - 0x1f4]
mov ecx, 0x5e
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov esi, 0x4cbac8
lea edi, [ebp - 0x38c]
mov ecx, 0x66
rep movsd dword es:[edi], dword [esi]
mov word [ebp - 0x28], 8
lea eax, [ebp - 4]
call fcn.0040165c
mov edx, eax
inc dword [ebp - 0x1c]
mov ecx, dword [sym.Project1.exe__Form3]
mov eax, dword [ecx]
mov eax, dword [eax + 0x2d4]
call fcn.0048e36c
lea eax, [ebp - 4]
call fcn.004042bc
push eax
lea edx, [ebp - 0x3dc]
push edx
call fcn.004b9a1c
add esp, 8
dec dword [ebp - 0x1c]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004c3e54
mov byte [0x4dec38], 2
push 0
xor ecx, ecx
mov dl, 0x43
mov eax, dword [ebp - 0x3c]
call fcn.00412b10
test eax, eax
je 0x414ce3
mov al, 4
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
mov eax, dword [ebp - 0x3c]
call fcn.004133b0
test eax, eax
je 0x414d00
mov al, 3
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
xor ecx, ecx
mov cl, byte [0x4dead6]
push ecx
push 0x4dead7
push 0x4deabe
call fcn.004b9880
add esp, 0xc
push 0xb
push 0
lea eax, [ebp - 0x78]
push eax
call fcn.004b98f0
add esp, 0xc
cmp byte [0x4dead6], 0xb
jbe 0x414d9c
inc byte [0x4dead6]
mov byte [ebp - 0x45], 0
jmp 0x414d91
xor edx, edx
mov dl, byte [0x4dead6]
cmp byte [edx + 0x4dead5], 0x56
je 0x414d62
xor ecx, ecx
mov cl, byte [0x4dead6]
cmp byte [ecx + 0x4dead5], 0x43
jne 0x414d88
inc byte [ebp - 0x45]
xor eax, eax
mov al, byte [ebp - 0x45]
push eax
xor edx, edx
mov dl, byte [0x4dead6]
add edx, 0x4dead5
push edx
lea ecx, [ebp - 0x78]
push ecx
call fcn.004b9880
add esp, 0xc
jmp 0x414db3
dec byte [0x4dead6]
inc byte [ebp - 0x45]
cmp byte [0x4dead6], 0
jne 0x414d40
jmp 0x414db3
mov byte [ebp - 0x45], 0xa
push 0xa
push 0x4dead7
lea eax, [ebp - 0x78]
push eax
call fcn.004b9880
add esp, 0xc
mov word [ebp - 0x28], 0x14
lea edx, [ebp - 0x78]
lea eax, [ebp - 8]
call fcn.004c3c68
inc dword [ebp - 0x1c]
mov edx, dword [eax]
mov ecx, dword [sym.Project1.exe__Form3]
mov eax, dword [ecx]
mov eax, dword [eax + 0x2d8]
call fcn.0048e39c
dec dword [ebp - 0x1c]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004c3e54
movsx ecx, byte [ebp - 0x3be]
cmp ecx, 0x34
je 0x414e14
movsx eax, byte [ebp - 0x3be]
cmp eax, 0x38
je 0x414e14
movsx edx, byte [ebp - 0x3be]
cmp edx, 0x56
jne 0x414ee1
mov byte [ebp - 0x48], 0
xor ecx, ecx
mov cl, byte [ebp - 0x45]
push ecx
xor eax, eax
mov al, byte [ebp - 0x48]
mov edx, eax
shl edx, 3
lea edx, [edx + edx*2]
lea ecx, [ebp - 0x38c]
add edx, ecx
push edx
lea eax, [ebp - 0x78]
push eax
call fcn.004b9b4c
add esp, 0xc
test eax, eax
je 0x414e4d
inc byte [ebp - 0x48]
cmp byte [ebp - 0x48], 0x11
jb 0x414e18
cmp byte [ebp - 0x48], 0x11
jne 0x414e64
mov al, 0xf
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
push 2
xor ecx, ecx
mov cl, byte [ebp - 0x48]
mov eax, ecx
shl eax, 3
lea eax, [eax + eax*2]
lea edx, [ebp - 0x382]
add eax, edx
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.004b9880
add esp, 0xc
xor eax, eax
mov al, byte [ebp - 0x48]
lea edx, [eax + eax*2]
mov ecx, dword [ebp + edx*8 - 0x37c]
mov dword [0x4dea5c], ecx
xor eax, eax
mov al, byte [ebp - 0x48]
lea edx, [eax + eax*2]
mov ecx, dword [ebp + edx*8 - 0x37c]
mov dword [0x4dea60], ecx
xor eax, eax
mov al, byte [ebp - 0x48]
lea edx, [eax + eax*2]
mov cl, byte [ebp + edx*8 - 0x380]
mov byte [0x4dec3a], cl
xor eax, eax
mov al, byte [ebp - 0x48]
lea edx, [eax + eax*2]
mov cl, byte [ebp + edx*8 - 0x378]
mov byte [0x4dec39], cl
jmp 0x414f72
mov byte [ebp - 0x49], 0
xor eax, eax
mov al, byte [ebp - 0x49]
imul edx, eax, 0xe
lea ecx, [ebp - 0x1f4]
add edx, ecx
push edx
lea eax, [ebp - 0x78]
push eax
call fcn.004b99d0
add esp, 8
test eax, eax
je 0x414f0f
inc byte [ebp - 0x49]
cmp byte [ebp - 0x49], 0x1b
jb 0x414ee5
cmp byte [ebp - 0x49], 0x1b
jne 0x414f26
mov al, 0xd
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
push 2
xor ecx, ecx
mov cl, byte [ebp - 0x49]
imul eax, ecx, 0xe
lea edx, [ebp - 0x1e9]
add eax, edx
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.004b9880
add esp, 0xc
xor eax, eax
mov al, byte [ebp - 0x49]
mov edx, eax
shl edx, 3
sub edx, eax
mov cl, byte [ebp + edx*2 - 0x1e7]
mov byte [0x4dec3a], cl
mov dword [0x4dea5c], 0x100
mov dword [0x4dea60], 0x100
push 5
lea ecx, [ebp - 0x44]
mov dl, 0x2b
mov eax, dword [ebp - 0x3c]
call fcn.00412b10
test eax, eax
je 0x414f96
mov al, 4
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
mov eax, dword [ebp - 0x3c]
call fcn.004133b0
test eax, eax
je 0x414fb3
mov al, 3
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
cmp byte [0x4dead5], 9
je 0x414fcd
mov al, 6
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
push 2
lea ecx, [ebp - 0x47]
mov dl, 0x1b
mov eax, dword [ebp - 0x3c]
call fcn.00412b10
test eax, eax
je 0x414ff1
mov al, 4
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
mov eax, dword [ebp - 0x3c]
call fcn.004133b0
test eax, eax
je 0x41500e
mov al, 3
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
cmp byte [0x4dead5], 9
je 0x41537c
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push 0x4cc5a0
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x50], eax
cmp eax, 0xffffffff
je 0x41537c
push 0
push dword [ebp - 0x50]
call sub.kernel32.dll_GetFileSize_1
mov dword [ebp - 0x54], eax
mov byte [ebp - 0x55], 0
xor edx, edx
mov dword [ebp - 0x5c], edx
mov ecx, dword [ebp - 0x5c]
cmp ecx, dword [ebp - 0x54]
jae 0x415149
push 0
push 0x4dec34
push 2
lea eax, [ebp - 0x47]
push eax
push dword [ebp - 0x50]
call sub.kernel32.dll_ReadFile_1
push 2
lea ecx, [ebp - 0x47]
mov dl, 0x1b
mov eax, dword [ebp - 0x3c]
call fcn.00412b10
test eax, eax
je 0x41509e
mov al, 4
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
mov eax, dword [ebp - 0x3c]
call fcn.004133b0
test eax, eax
je 0x4150bb
mov al, 3
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
cmp byte [0x4dead5], 9
jne 0x4150d1
push dword [ebp - 0x50]
call sub.kernel32.dll_CloseHandle_1
jmp 0x41537c
cmp byte [ebp - 0x55], 7
jne 0x415136
mov byte [ebp - 0x55], 0
push 5
lea ecx, [ebp - 0x44]
mov dl, 0x2b
mov eax, dword [ebp - 0x3c]
call fcn.00412b10
test eax, eax
je 0x4150ff
mov al, 4
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
mov eax, dword [ebp - 0x3c]
call fcn.004133b0
test eax, eax
je 0x41511c
mov al, 3
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
cmp byte [0x4dead5], 9
je 0x415136
mov al, 6
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
add dword [ebp - 0x5c], 2
inc byte [ebp - 0x55]
mov ecx, dword [ebp - 0x5c]
cmp ecx, dword [ebp - 0x54]
jb 0x415065
cmp byte [0x4dec39], 0
je 0x41516b
push dword [ebp - 0x50]
call sub.kernel32.dll_CloseHandle_1
mov al, 0xe
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
mov ecx, dword [sym.Project1.exe__Form3]
mov eax, dword [ecx]
mov edx, 0x9d
call fcn.0048dbc4
mov ecx, dword [0x4cbc60]
mov dword [ebp - 0x64], ecx
mov cx, word [0x4cbc64]
mov word [ebp - 0x60], cx
mov cl, byte [0x4cbc66]
mov byte [ebp - 0x5e], cl
mov dl, 1
mov eax, dword [0x45e0d0]
call fcn.0045e1d0
mov dword [ebp - 0x68], eax
mov edx, 0x80000002
mov eax, dword [ebp - 0x68]
call fcn.004c3bdc
mov word [ebp - 0x28], 0x20
mov edx, 0x4cc5b1
lea eax, [ebp - 0xc]
call fcn.004c3c68
inc dword [ebp - 0x1c]
mov edx, dword [eax]
mov cl, 1
mov eax, dword [ebp - 0x68]
call fcn.0045e2d8
dec dword [ebp - 0x1c]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004c3e54
mov word [ebp - 0x28], 0x38
mov edx, 0x4cc5ca
lea eax, [ebp - 0x10]
call fcn.004c3c68
inc dword [ebp - 0x1c]
mov edx, dword [eax]
mov eax, dword [ebp - 0x68]
call fcn.0045e814
mov dword [ebp - 0x6c], eax
dec dword [ebp - 0x1c]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004c3e54
mov word [ebp - 0x28], 0x2c
mov eax, dword [ebp - 0x68]
call fcn.0045e240
mov dl, byte [ebp - 0x6c]
mov byte [ebp - 0x46], dl
mov ecx, dword [ebp - 0x6c]
shr ecx, 8
mov byte [ebp - 0x47], cl
cmp dword [ebp - 0x6c], 0x10000
jae 0x41536e
push dword [ebp - 0x6c]
push 0x4cc5d4
lea eax, [ebp - 0x64]
push eax
call fcn.004bb6d8
add esp, 0xc
mov word [ebp - 0x28], 0x44
lea edx, [ebp - 0x64]
lea eax, [ebp - 0x14]
call fcn.004c3c68
inc dword [ebp - 0x1c]
mov edx, dword [eax]
mov ecx, dword [sym.Project1.exe__Form3]
mov eax, dword [ecx]
mov eax, dword [eax + 0x2e8]
call fcn.0048e39c
dec dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004c3e54
push 2
lea ecx, [ebp - 0x47]
mov dl, 0x1b
mov eax, dword [ebp - 0x3c]
call fcn.00412b10
test eax, eax
je 0x4152b6
mov al, 4
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
mov eax, dword [ebp - 0x3c]
call fcn.004133b0
test eax, eax
je 0x4152d3
mov al, 3
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
cmp byte [0x4dead5], 0xa
je 0x4152f3
push 0
push 0x4dec34
push 2
lea ecx, [ebp - 0x47]
push ecx
push dword [ebp - 0x50]
call sub.kernel32.dll_WriteFile_1
jmp 0x41536e
inc byte [ebp - 0x46]
cmp byte [ebp - 0x46], 0
jne 0x4152ff
inc byte [ebp - 0x47]
cmp byte [ebp - 0x55], 7
jne 0x41535b
mov byte [ebp - 0x55], 0
push 5
lea ecx, [ebp - 0x44]
mov dl, 0x2b
mov eax, dword [ebp - 0x3c]
call fcn.00412b10
test eax, eax
je 0x41532a
mov al, 4
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
mov eax, dword [ebp - 0x3c]
call fcn.004133b0
test eax, eax
je 0x415344
mov al, 3
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
cmp byte [0x4dead5], 9
je 0x41535b
mov al, 6
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
jmp 0x415388
inc dword [ebp - 0x6c]
inc byte [ebp - 0x55]
cmp dword [ebp - 0x6c], 0x10000
jb 0x415245
push dword [ebp - 0x50]
call sub.kernel32.dll_CloseHandle_1
mov word [ebp - 0x28], 0
xor eax, eax
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
pop edi
pop esi
mov esp, ebp
pop ebp
ret