Function at 0x4143a0
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x139c4
call fcn.0042e520
mov eax, dword [esp + 0x139c8]
push ebp
xor ebp, ebp
push 0x431dcc
push eax
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], ebp
call dword [0x472ec4]
add esp, 8
cmp eax, ebp
mov dword [esp + 0xc], eax
jne 0x4143de
or eax, 0xffffffff
pop ebp
add esp, 0x139c4
ret
push ebx
push esi
push edi
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x58]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x24]
mov ebx, 0x435760
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x1388
xor eax, eax
lea edi, [esp + 0xebb4]
rep stosd dword es:[edi], eax
mov ecx, 0x1388
lea edi, [esp + 0x4f74]
rep stosd dword es:[edi], eax
mov ecx, 0x1388
lea edi, [esp + 0x9d94]
rep stosd dword es:[edi], eax
mov ecx, 0x1388
lea edi, [esp + 0x154]
rep stosd dword es:[edi], eax
mov ecx, 0x32
xor eax, eax
lea edi, [esp + 0x8c]
xor esi, esi
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.MSVCRT.dll_fgetc]
add esp, 4
cmp eax, 0xffffffff
je 0x414547
test esi, esi
jne 0x414470
cmp eax, 0x53
jne 0x414478
mov dword [esp + esi*4 + 0x8c], eax
inc esi
cmp eax, 0xa
jne 0x414450
cmp dword [esp + 0x8c], 0x53
jne 0x41443e
mov eax, dword [esp + 0x90]
cmp eax, 0x30
jne 0x4144b4
xor eax, eax
test esi, esi
jle 0x4144ae
lea ecx, [esp + 0x8c]
mov dl, byte [ecx]
add ecx, 4
mov byte [esp + eax + 0x58], dl
inc eax
cmp eax, esi
jl 0x4144a0
mov dword [esp + 0x10], esi
jmp 0x41443e
cmp eax, 0x38
je 0x414528
cmp eax, 0x32
jne 0x41443e
mov ecx, 0xc
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
test esi, esi
jle 0x4144e5
lea ecx, [esp + 0x8c]
mov dl, byte [ecx]
add ecx, 4
mov byte [ebx + eax], dl
inc eax
cmp eax, esi
jl 0x4144d8
mov dword [esp + ebp*4 + 0xebb4], esi
xor eax, eax
lea ecx, [esp + 0x9c]
mov dl, byte [ecx]
add ecx, 4
mov byte [esp + eax + 0x1c], dl
inc eax
cmp eax, 6
jl 0x4144f5
lea eax, [esp + 0x1c]
push eax
call fcn.00414620
add esp, 4
mov dword [esp + ebp*4 + 0x9d94], eax
mov dword [esp + ebp*4 + 0x154], eax
inc ebp
add ebx, 0x32
jmp 0x41443e
xor eax, eax
test esi, esi
jle 0x414543
lea ecx, [esp + 0x8c]
mov dl, byte [ecx]
add ecx, 4
mov byte [esp + eax + 0x24], dl
inc eax
cmp eax, esi
jl 0x414535
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
lea ecx, [esp + 0x158]
push ebp
push ecx
call fcn.00424210
add esp, 0xc
xor ecx, ecx
test ebp, ebp
jle 0x41458f
mov edx, dword [esp + ecx*4 + 0x154]
xor eax, eax
cmp edx, dword [esp + eax*4 + 0x9d94]
jne 0x414585
mov dword [esp + ecx*4 + 0x4f74], eax
lea eax, [ebp + 2]
inc eax
cmp eax, ebp
jl 0x414572
inc ecx
cmp ecx, ebp
jl 0x414569
push 0x432004
push str..._updatefile_B30_IC_IC_reflash.s19
call dword [0x472ec4]
mov edx, dword [esp + 0x18]
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
mov esi, eax
lea eax, [esp + 0x60]
push esi
push 1
push edx
push eax
call ebx
add esp, 0x18
test ebp, ebp
jle 0x4145ea
lea edi, [esp + 0x4f74]
mov eax, dword [edi]
push esi
push 1
mov ecx, dword [esp + eax*4 + 0xebbc]
lea eax, [eax + eax*4]
push ecx
lea edx, [eax + eax*4]
lea eax, [edx*2 + 0x435760]
push eax
call ebx
add esp, 0x10
add edi, 4
dec ebp
jne 0x4145c4
mov ecx, dword [esp + 0x14]
push esi
push 1
lea edx, [esp + 0x2c]
push ecx
push edx
call ebx
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
mov eax, 1
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x139c4
ret