Function at 0x4a26f0
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 8], edi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], ebx
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x40]
mov ebx, dword [esi + 0x3c]
test eax, eax
je 0x4a2710
sub ebx, eax
jmp 0x4a2715
mov eax, dword [esi + 0x38]
sub ebx, eax
lea eax, [ebx + 4]
cmp eax, dword [esi + 0xdc]
ja 0x4a2b95
movsx edx, byte [esi + 0x144]
lea eax, [edx - 1]
cmp eax, 7
ja case.default.0x4a273e
mov eax, dword [eax*4 + 0x4fcc28]
jmp eax
mov eax, dword [esi + 0x40]
test eax, eax
je 0x4a2a83
mov byte [eax + ebx], 0xd
mov eax, dword [esi + 0x40]
mov byte [eax + ebx + 1], 0xa
add ebx, 2
jmp case.0x4a273e.5
mov eax, dword [esi + 0x40]
test eax, eax
je 0x4a2a9a
mov byte [eax + ebx], 0xd
inc ebx
jmp case.0x4a273e.5
mov eax, dword [esi + 0x40]
test eax, eax
je 0x4a2aa7
mov byte [eax + ebx], 0xa
inc ebx
jmp case.0x4a273e.5
mov edx, dword [esi + 0x40]
test edx, edx
je 0x4a2ab4
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
test bl, 1
je case.0x4a273e.5
mov eax, dword [esi + 0x40]
mov byte [eax + ebx], 0
inc ebx
jmp case.0x4a273e.5
mov eax, dword [esi + 0x128]
cmp eax, 0xb
jne 0x4a28ef
cmp edx, 5
je 0x4a27da
cmp edx, 4
jne 0x4a28ef
mov edx, dword [esi + 0x40]
test edx, edx
je 0x4a27ee
mov ecx, dword [esi + 0x3c]
sub ecx, edx
add ecx, 0xfffffffc
mov dword [ebp - 0x10], ecx
jmp 0x4a27f7
mov edx, dword [esi + 0x38]
lea ecx, [ebx - 4]
mov dword [ebp - 0x10], ecx
movzx eax, byte [esi + 0x162]
test al, 0x20
je 0x4a2814
and eax, 0xffffffdf
mov byte [esi + 0x162], al
mov eax, ecx
neg eax
mov dword [ebp - 0x1c], eax
jmp 0x4a2817
mov dword [ebp - 0x1c], ecx
movzx eax, byte [esi + 0x15d]
test al, 0x20
je 0x4a284b
lea edi, [ebp - 0x19]
movzx eax, byte [edi]
mov byte [edx], al
lea eax, [ebp - 0x1a]
mov dword [ebp - 0x18], eax
movzx eax, byte [eax]
mov byte [edx + 1], al
lea eax, [ebp - 0x1b]
mov dword [ebp - 0x14], eax
movzx eax, byte [eax]
mov byte [edx + 2], al
movzx eax, byte [ebp - 0x1c]
mov byte [edx + 3], al
jmp 0x4a2872
movzx eax, byte [ebp - 0x1c]
lea edi, [ebp - 0x1b]
mov dword [ebp - 0x14], edi
mov byte [edx], al
movzx eax, byte [edi]
mov byte [edx + 1], al
lea eax, [ebp - 0x1a]
mov dword [ebp - 0x18], eax
lea edi, [ebp - 0x19]
movzx eax, byte [eax]
mov byte [edx + 2], al
movzx eax, byte [edi]
mov byte [edx + 3], al
mov eax, dword [esi + 0x13c]
test eax, eax
je 0x4a2883
neg ecx
mov dword [ebp - 0x1c], ecx
jmp 0x4a2886
mov dword [ebp - 0x1c], ecx
movzx eax, byte [esi + 0x15d]
test al, 0x20
je 0x4a28bd
mov edx, dword [esi + 0x3c]
movzx eax, byte [edi]
mov edi, dword [ebp - 0x18]
movzx ecx, byte [edi]
mov edi, dword [ebp - 0x14]
mov byte [edx], al
mov eax, dword [esi + 0x3c]
movzx edx, byte [edi]
mov byte [eax + 1], cl
mov ecx, dword [esi + 0x3c]
movzx eax, byte [ebp - 0x1c]
mov byte [ecx + 2], dl
mov edx, dword [esi + 0x3c]
mov byte [edx + 3], al
jmp 0x4a28e7
movzx ecx, byte [ebp - 0x1c]
mov edx, dword [ebp - 0x14]
mov eax, dword [esi + 0x3c]
movzx edx, byte [edx]
mov byte [eax], cl
mov ecx, dword [esi + 0x3c]
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
mov byte [ecx + 1], dl
mov edx, dword [esi + 0x3c]
movzx ecx, byte [edi]
mov byte [edx + 2], al
mov eax, dword [esi + 0x3c]
mov byte [eax + 3], cl
add ebx, 4
jmp case.0x4a273e.5
mov ecx, dword [esi + 0x40]
test ecx, ecx
je 0x4a2adb
mov edi, dword [esi + 0x3c]
movzx edx, byte [esi + 0x15d]
sub edi, ecx
add edi, 0xfffffffc
mov eax, edi
and eax, 0xff
test dl, 0x20
mov dword [ebp - 0x10], edi
je 0x4a294f
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 0x4a297c
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
movzx edx, byte [esi + 0x15d]
test dl, 0x20
je 0x4a29aa
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 0x4a29ca
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.0x4a273e.5
mov eax, dword [esi + 0xe8]
cmp ebx, eax
jae case.0x4a273e.5
sub eax, ebx
push eax
push 0
push dword [esi + 0x3c]
call fcn.004e2770
add esp, 0xc
mov ebx, dword [esi + 0xe8]
jmp case.0x4a273e.5
push 0x246
push str.for_put.c
push 2
push 8
call fcn.00492dd0
add esp, 0x10
mov edx, dword [esi + 0x40]
test edx, edx
je 0x4a2b84
mov eax, esi
mov ecx, ebx
call fcn.004a21fc
and byte [esi + 0x15c], 0xbf
cmp eax, 0xffffffff
je 0x4a2b66
movzx eax, byte [esi + 0x15d]
test al, 8
je 0x4a2a74
push dword [esi + 0xd4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x4a2a4f
and byte [esi + 0x15d], 0xf7
jmp 0x4a2a74
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
and byte [esi + 0x15d], 0xf7
mov dword [esi + 0xd8], eax
mov esi, dword [ebp - 4]
mov eax, 0x26
mov esp, ebp
pop ebp
ret
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.0x4a273e.5
mov eax, dword [esi + 0x38]
mov byte [eax + ebx], 0xd
inc ebx
jmp case.0x4a273e.5
mov eax, dword [esi + 0x38]
mov byte [eax + ebx], 0xa
inc ebx
jmp case.0x4a273e.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
test bl, 1
je case.0x4a273e.5
mov eax, dword [esi + 0x38]
mov byte [eax + ebx], 0
inc ebx
jmp case.0x4a273e.5
movzx ecx, byte [esi + 0x15d]
lea edi, [ebx - 4]
mov dword [ebp - 0x10], edi
mov eax, edi
and eax, 0xff
test cl, 0x20
je 0x4a2b31
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 0x4a297c
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 0x4a297c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
mov dword [esi + 0xd8], 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.004a21fc
jmp 0x4a2a1b
push 0x200
push esi
call fcn.0049ec90
add esp, 8
test eax, eax
je 0x4a2724
push 4
push esi
call fcn.0049ec90
add esp, 8
test eax, eax
je 0x4a2724
cmp ebx, dword [esi + 0xdc]
ja 0x4a2bd6
movsx edx, byte [esi + 0x144]
cmp edx, 1
je 0x4a272b
mov edx, dword [esi + 0x18]
test edx, edx
je 0x4a2c38
movzx eax, byte [edx + 0x44]
test al, 2
je 0x4a2c11
mov eax, 0x42
mov dword [edx + 0x38], eax
mov edx, dword [esi + 0x18]
mov dword [edx + 0x3c], eax
mov eax, dword [esi + 0x64]
test eax, eax
je 0x4a2c02
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 + 0x15c]
and edx, 7
mov eax, 0x42
push eax
push eax
push edx
push 0xffffffffffffffff
push esi
call fcn.00495320
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.00490ca0
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret