Function at 0x1002c190
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x105520d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp byte [eax + 0x2c], 0
movzx edx, byte [eax + 0xb]
push ebx
push esi
mov ebx, ecx
lea ecx, [eax + 0x2c]
push edi
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x224], eax
push edx
je 0x1002c1f6
movzx edx, byte [eax + 0xa]
push edx
movzx edx, byte [eax + 9]
push edx
movzx edx, byte [eax + 8]
push edx
movzx edx, byte [eax + 7]
movzx eax, byte [eax + 6]
push edx
push eax
push ecx
lea ecx, [ebp - 0x21c]
push str.calData__s__02x_02x_02x_02x_02x_02x.txt
push ecx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0x24
jmp 0x1002c224
movzx ecx, byte [eax + 0xa]
movzx edx, byte [eax + 9]
push ecx
movzx ecx, byte [eax + 8]
push edx
movzx edx, byte [eax + 7]
movzx eax, byte [eax + 6]
push ecx
push edx
push eax
lea ecx, [ebp - 0x21c]
push str.calData__02x_02x_02x_02x_02x_02x.txt
push ecx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0x20
lea eax, [ebx + 0xfb0c]
lea edx, [ebp - 0x110]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x1002c232
lea eax, [ebp - 0x21c]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002c244
lea edi, [ebp - 0x110]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1002c254
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [ebp - 0x110]
and ecx, 3
push 0x10223978
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCR100.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
jne 0x1002c2b1
lea eax, [ebp - 0x110]
push eax
push str.Could_not_open_calDataFile__s_n
push ebx
call fcn.10029960
add esp, 0xc
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10203cc8
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [sym.imp.MSVCR100.dll_fprintf]
xor esi, esi
lea esp, [esp]
mov ecx, dword [ebp - 0x224]
movzx edx, word [esi + ecx]
push esi
push edx
push str._04x______04x_n
push edi
call ebx
add esi, 2
add esp, 0x10
cmp esi, 0x1fbc
jb 0x1002c2c0
push edi
mov edi, dword [sym.imp.MSVCR100.dll_fclose]
call edi
lea eax, [ebp - 0x110]
add esp, 4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002c2f7
mov cx, word [0x1025a930]
sub eax, edx
mov dl, byte [0x1025a932]
lea eax, [ebp + eax - 0x113]
mov word [eax], cx
mov byte [eax + 2], dl
lea eax, [ebp - 0x110]
push 0x1021caa0
push eax
call dword [sym.imp.MSVCR100.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x1002c365
mov edx, dword [ebp - 0x220]
lea ecx, [ebp - 0x110]
push ecx
push str.Could_not_open_calDataFile__s_to_write_n
push edx
call fcn.10029960
add esp, 0xc
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10203cc8
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x224]
push esi
push 0x1fbc
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp eax, 0x1fbc
je 0x1002c3a3
mov edx, dword [ebp - 0x220]
lea ecx, [ebp - 0x110]
push ecx
push str.Error_writing_to__s_n
push edx
call fcn.10029960
add esp, 0xc
xor bl, bl
jmp 0x1002c3c0
mov ecx, dword [ebp - 0x220]
lea eax, [ebp - 0x110]
push eax
push str...._written_to__s_n
push ecx
call fcn.10029960
add esp, 0xc
mov bl, 1
push esi
call edi
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.10203cc8
mov esp, ebp
pop ebp
ret 4