Function at 0x41c520
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], edi
mov dword [ebp - 4], esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x40]
mov ebx, dword [esi + 0x3c]
test eax, eax
je 0x41c540
sub ebx, eax
jmp 0x41c545
mov eax, dword [esi + 0x38]
sub ebx, eax
lea eax, [ebx + 4]
cmp eax, dword [esi + 0xe4]
ja 0x41c9af
movsx edx, byte [esi + 0x14c]
lea eax, [edx - 1]
cmp eax, 7
ja case.default.0x41c56e
mov eax, dword [eax*4 + 0x4c827c]
jmp eax
mov eax, dword [esi + 0x40]
test eax, eax
je 0x41c875
mov byte [eax + ebx], 0xd
mov eax, dword [esi + 0x40]
mov byte [eax + ebx + 1], 0xa
add ebx, 2
jmp case.0x41c56e.5
mov eax, dword [esi + 0x40]
test eax, eax
je 0x41c889
mov byte [eax + ebx], 0xd
inc ebx
jmp case.0x41c56e.5
mov eax, dword [esi + 0x40]
test eax, eax
je 0x41c893
mov byte [eax + ebx], 0xa
inc ebx
jmp case.0x41c56e.5
mov edx, dword [esi + 0x40]
test edx, edx
je 0x41c89d
mov eax, dword [esi + 0x3c]
sub eax, edx
add eax, 0xfffffffe
mov byte [edx], al
mov edx, dword [esi + 0x40]
shr eax, 8
mov byte [edx + 1], al
mov eax, ebx
and eax, 0x80000001
jge 0x41c5e7
sub eax, 1
or eax, 0xfffffffe
inc eax
test eax, eax
je case.0x41c56e.5
mov eax, dword [esi + 0x40]
mov byte [eax + ebx], 0
inc ebx
jmp case.0x41c56e.5
cmp dword [esi + 0x130], 0xb
jne 0x41c70c
cmp edx, 5
je 0x41c617
cmp edx, 4
jne 0x41c70c
mov ecx, dword [esi + 0x40]
test ecx, ecx
je 0x41c62b
mov edi, dword [esi + 0x3c]
sub edi, ecx
add edi, 0xfffffffc
mov dword [ebp - 0x10], edi
jmp 0x41c634
mov ecx, dword [esi + 0x38]
lea edi, [ebx - 4]
mov dword [ebp - 0x10], edi
movzx edx, byte [esi + 0x16a]
test dl, 0x20
je 0x41c652
and edx, 0xffffffdf
mov byte [esi + 0x16a], dl
mov eax, edi
neg eax
mov dword [ebp - 0x1c], eax
jmp 0x41c655
mov dword [ebp - 0x1c], edi
test byte [esi + 0x165], 0x20
je 0x41c67d
lea eax, [ebp - 0x19]
movzx edx, byte [eax]
mov byte [ecx], dl
movzx edx, byte [ebp - 0x1a]
mov byte [ecx + 1], dl
movzx edx, byte [ebp - 0x1b]
mov byte [ecx + 2], dl
movzx edx, byte [ebp - 0x1c]
mov byte [ecx + 3], dl
jmp 0x41c69a
movzx eax, byte [ebp - 0x1c]
movzx edx, byte [ebp - 0x1b]
mov byte [ecx], al
lea eax, [ebp - 0x19]
mov byte [ecx + 1], dl
movzx edx, byte [ebp - 0x1a]
mov byte [ecx + 2], dl
movzx edx, byte [eax]
mov byte [ecx + 3], dl
cmp dword [esi + 0x144], 0
je 0x41c6aa
neg edi
mov dword [ebp - 0x1c], edi
jmp 0x41c6ad
mov dword [ebp - 0x1c], edi
test byte [esi + 0x165], 0x20
je 0x41c6de
movzx edx, byte [ebp - 0x1a]
mov edi, dword [esi + 0x3c]
movzx eax, byte [eax]
mov byte [edi], al
mov ecx, dword [esi + 0x3c]
movzx eax, byte [ebp - 0x1b]
mov byte [ecx + 1], dl
movzx edx, byte [ebp - 0x1c]
mov edi, dword [esi + 0x3c]
mov byte [edi + 2], al
mov ecx, dword [esi + 0x3c]
mov byte [ecx + 3], dl
jmp 0x41c704
movzx edx, byte [ebp - 0x1c]
movzx ecx, byte [ebp - 0x1b]
mov edi, dword [esi + 0x3c]
movzx eax, byte [eax]
mov byte [edi], dl
mov edi, dword [esi + 0x3c]
movzx edx, byte [ebp - 0x1a]
mov byte [edi + 1], cl
mov ecx, dword [esi + 0x3c]
mov byte [ecx + 2], dl
mov edx, dword [esi + 0x3c]
mov byte [edx + 3], al
add ebx, 4
jmp case.0x41c56e.5
mov ecx, dword [esi + 0x40]
test ecx, ecx
je 0x41c8d3
mov edi, dword [esi + 0x3c]
sub edi, ecx
add edi, 0xfffffffc
mov dword [ebp - 0x10], edi
mov eax, edi
and eax, 0xff
test byte [esi + 0x165], 0x20
je 0x41c769
mov edx, edi
shr edx, 0x18
mov dword [ebp - 0x14], edx
mov byte [ecx], dl
mov edx, dword [esi + 0x40]
mov ecx, edi
shr ecx, 0x10
movzx ecx, cl
mov dword [ebp - 0x1c], ecx
mov byte [edx + 1], cl
mov ecx, dword [esi + 0x40]
shr edi, 8
mov edx, edi
and edx, 0xff
mov dword [ebp - 0x18], edx
mov byte [ecx + 2], dl
mov edi, dword [esi + 0x40]
mov byte [edi + 3], al
jmp 0x41c796
movzx eax, byte [ebp - 0x10]
movzx edx, byte [ebp - 0xf]
mov dword [ebp - 0x18], edx
mov byte [ecx], al
mov edi, dword [esi + 0x40]
movzx ecx, byte [ebp - 0xe]
mov dword [ebp - 0x1c], ecx
mov byte [edi + 1], dl
mov edx, dword [esi + 0x40]
mov byte [edx + 2], cl
movzx edx, byte [ebp - 0xd]
mov ecx, dword [esi + 0x40]
mov dword [ebp - 0x14], edx
mov byte [ecx + 3], dl
test byte [esi + 0x165], 0x20
je 0x41c7c1
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
mov edi, dword [esi + 0x3c]
mov byte [edi], dl
mov edx, dword [esi + 0x3c]
mov byte [edx + 1], cl
mov edx, dword [ebp - 0x18]
mov ecx, dword [esi + 0x3c]
mov byte [ecx + 2], dl
mov edi, dword [esi + 0x3c]
mov byte [edi + 3], al
jmp 0x41c7e1
mov ecx, dword [ebp - 0x1c]
mov edi, dword [esi + 0x3c]
mov byte [edi], al
mov eax, dword [ebp - 0x18]
mov edx, dword [esi + 0x3c]
mov byte [edx + 1], al
mov eax, dword [ebp - 0x14]
mov edi, dword [esi + 0x3c]
mov byte [edi + 2], cl
mov edx, dword [esi + 0x3c]
mov byte [edx + 3], al
add ebx, 4
jmp case.0x41c56e.5
mov eax, dword [esi + 0xf0]
cmp ebx, eax
jae case.0x41c56e.5
sub eax, ebx
push eax
push 0
push dword [esi + 0x3c]
call fcn.004a6330
add esp, 0xc
mov ebx, dword [esi + 0xf0]
jmp case.0x41c56e.5
push 0x24e
push str.for_put.c
push 2
push 8
call fcn.00404de0
add esp, 0x10
mov edx, dword [esi + 0x40]
test edx, edx
je 0x41c99e
mov eax, esi
mov ecx, ebx
call fcn.0041ca7c
and byte [esi + 0x164], 0xbf
cmp eax, 0xffffffff
je 0x41c980
test byte [esi + 0x165], 8
je 0x41c866
push dword [esi + 0xdc]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x41c95b
and byte [esi + 0x165], 0xf7
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x38]
mov byte [eax + ebx], 0xd
mov edx, dword [esi + 0x38]
mov byte [edx + ebx + 1], 0xa
add ebx, 2
jmp case.0x41c56e.5
mov eax, dword [esi + 0x38]
mov byte [eax + ebx], 0xd
inc ebx
jmp case.0x41c56e.5
mov eax, dword [esi + 0x38]
mov byte [eax + ebx], 0xa
inc ebx
jmp case.0x41c56e.5
mov edx, dword [esi + 0x38]
lea eax, [ebx - 2]
mov byte [edx], al
mov ecx, dword [esi + 0x38]
shr eax, 8
mov byte [ecx + 1], al
mov eax, ebx
and eax, 0x80000001
jge 0x41c8be
sub eax, 1
or eax, 0xfffffffe
inc eax
test eax, eax
je case.0x41c56e.5
mov eax, dword [esi + 0x38]
mov byte [eax + ebx], 0
inc ebx
jmp case.0x41c56e.5
lea edi, [ebx - 4]
mov dword [ebp - 0x10], edi
mov eax, edi
and eax, 0xff
test byte [esi + 0x165], 0x20
je 0x41c926
mov ecx, dword [esi + 0x38]
mov edx, edi
shr edx, 0x18
mov dword [ebp - 0x14], edx
mov byte [ecx], dl
mov edx, dword [esi + 0x38]
mov ecx, edi
shr ecx, 0x10
movzx ecx, cl
mov dword [ebp - 0x1c], ecx
mov byte [edx + 1], cl
mov ecx, dword [esi + 0x38]
shr edi, 8
mov edx, edi
and edx, 0xff
mov dword [ebp - 0x18], edx
mov byte [ecx + 2], dl
mov edi, dword [esi + 0x38]
mov byte [edi + 3], al
jmp 0x41c796
movzx eax, byte [ebp - 0x10]
movzx edx, byte [ebp - 0xf]
mov edi, dword [esi + 0x38]
mov dword [ebp - 0x18], edx
mov byte [edi], al
mov ecx, dword [esi + 0x38]
mov byte [ecx + 1], dl
movzx ecx, byte [ebp - 0xe]
mov edx, dword [esi + 0x38]
mov dword [ebp - 0x1c], ecx
mov byte [edx + 2], cl
movzx edx, byte [ebp - 0xd]
mov edi, dword [esi + 0x38]
mov dword [ebp - 0x14], edx
mov byte [edi + 3], dl
jmp 0x41c796
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
and byte [esi + 0x165], 0xf7
mov dword [esi + 0xe0], eax
mov esi, dword [ebp - 4]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
mov dword [esi + 0xe0], eax
mov esi, dword [ebp - 4]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x38]
mov eax, esi
mov ecx, ebx
call fcn.0041ca7c
jmp 0x41c832
push 0x200
push esi
call fcn.0041ff40
add esp, 8
test eax, eax
je 0x41c554
push 4
push esi
call fcn.0041ff40
add esp, 8
test eax, eax
je 0x41c554
cmp ebx, dword [esi + 0xe4]
ja 0x41c9f0
movsx edx, byte [esi + 0x14c]
cmp edx, 1
je 0x41c55b
mov eax, dword [esi + 0x18]
test eax, eax
je 0x41ca50
test byte [eax + 0x44], 2
je 0x41ca29
mov edx, 0x42
mov dword [eax + 0x38], edx
mov eax, dword [esi + 0x18]
mov dword [eax + 0x3c], edx
mov eax, dword [esi + 0x64]
test eax, eax
je 0x41ca1a
xor edx, edx
mov dword [eax + 4], edx
mov dword [esi + 0x64], edx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov eax, 0x42
mov esp, ebp
pop ebp
ret
movzx edx, byte [esi + 0x164]
and edx, 7
mov eax, 0x42
push eax
push eax
push edx
push 0xffffffffffffffff
push esi
call fcn.00424300
add esp, 0x14
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
push esi
mov eax, 0x42
push eax
push eax
push 1
call fcn.00402d40
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret