Function at 0x1002d0b7
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
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 0x1002d070
sub ebx, eax
jmp 0x1002d075
mov eax, dword [esi + 0x38]
sub ebx, eax
lea eax, [ebx + 4]
cmp eax, dword [esi + 0xbc]
ja 0x1002d507
movsx edx, byte [esi + 0x11c]
lea eax, [edx - 1]
cmp eax, 6
ja case.default.0x1002d09e
mov eax, dword [eax*4 + 0x100bde44]
jmp eax
mov eax, dword [esi + 0x40]
test eax, eax
je 0x1002d2bf
mov byte [eax + ebx], 0xd
add ebx, 1
jmp case.0x1002d09e.5
mov eax, dword [esi + 0x40]
test eax, eax
je 0x1002d2ce
mov byte [eax + ebx], 0xd
mov eax, dword [esi + 0x40]
mov byte [eax + ebx + 1], 0xa
add ebx, 2
jmp case.0x1002d09e.5
mov edx, dword [esi + 0x40]
test edx, edx
je 0x1002d2e5
mov eax, edx
neg eax
add eax, dword [esi + 0x3c]
shl eax, 0x10
add eax, 0xfffe0000
shr eax, 0x10
mov byte [edx], al
mov edx, dword [esi + 0x40]
shr eax, 8
mov byte [edx + 1], al
mov ecx, ebx
and ecx, 1
je case.0x1002d09e.5
mov eax, dword [esi + 0x40]
mov byte [eax + ebx], 0
add ebx, 1
jmp case.0x1002d09e.5
mov eax, dword [esi + 0x100]
cmp eax, 0xb
jne 0x1002d12c
cmp edx, 4
je 0x1002d31a
mov ecx, dword [esi + 0x40]
test ecx, ecx
je 0x1002d44d
mov edi, dword [esi + 0x3c]
movzx edx, byte [esi + 0x12d]
sub edi, ecx
add edi, 0xfffffffc
mov eax, edi
and eax, 0xff
test dl, 8
mov dword [ebp - 0x20], edi
je 0x1002d18c
mov edx, edi
shr edx, 0x18
mov dword [ebp - 0x18], edx
mov byte [ecx], dl
mov edx, dword [esi + 0x40]
mov ecx, edi
shr ecx, 0x10
movzx ecx, cl
mov dword [ebp - 0x10], ecx
mov byte [edx + 1], cl
mov ecx, dword [esi + 0x40]
shr edi, 8
mov edx, edi
and edx, 0xff
mov dword [ebp - 0x14], edx
mov byte [ecx + 2], dl
mov edi, dword [esi + 0x40]
mov byte [edi + 3], al
jmp 0x1002d1b9
movzx eax, byte [ebp - 0x20]
movzx edx, byte [ebp - 0x1f]
mov dword [ebp - 0x14], edx
mov byte [ecx], al
mov edi, dword [esi + 0x40]
movzx ecx, byte [ebp - 0x1e]
mov dword [ebp - 0x10], ecx
mov byte [edi + 1], dl
mov edx, dword [esi + 0x40]
mov byte [edx + 2], cl
movzx edx, byte [ebp - 0x1d]
mov ecx, dword [esi + 0x40]
mov dword [ebp - 0x18], edx
mov byte [ecx + 3], dl
movzx edx, byte [esi + 0x12d]
test dl, 8
je 0x1002d1e7
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
mov edi, dword [esi + 0x3c]
mov byte [edi], dl
mov edx, dword [esi + 0x3c]
mov byte [edx + 1], cl
mov edx, dword [ebp - 0x14]
mov ecx, dword [esi + 0x3c]
mov byte [ecx + 2], dl
mov edx, dword [esi + 0x3c]
mov byte [edx + 3], al
jmp 0x1002d207
mov ecx, dword [ebp - 0x10]
mov edi, dword [esi + 0x3c]
mov byte [edi], al
mov eax, dword [ebp - 0x14]
mov edx, dword [esi + 0x3c]
mov byte [edx + 1], al
mov eax, dword [esi + 0x3c]
mov byte [eax + 2], cl
mov eax, dword [ebp - 0x18]
mov edx, dword [esi + 0x3c]
mov byte [edx + 3], al
add ebx, 4
jmp case.0x1002d09e.5
mov eax, dword [esi + 0xc0]
cmp ebx, eax
jae case.0x1002d09e.5
sub eax, ebx
push eax
push 0
push dword [esi + 0x3c]
call fcn.1007f474
add esp, 0xc
mov ebx, dword [esi + 0xc0]
jmp case.0x1002d09e.5
push 0x23b
push str.for_put.c
push 2
push 8
call fcn.100149ac
add esp, 0x10
mov edx, dword [esi + 0x40]
test edx, edx
je 0x1002d4f6
mov eax, esi
mov ecx, ebx
call fcn.1002ccfc
and byte [esi + 0x12c], 0xef
cmp eax, 0xffffffff
je 0x1002d4d8
movzx eax, byte [esi + 0x12d]
test al, 2
je 0x1002d2b0
push dword [esi + 0xb4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x1002d287
xor eax, eax
jmp 0x1002d298
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xb8], eax
mov eax, 0x26
and byte [esi + 0x12d], 0xfd
test eax, eax
je 0x1002d2b0
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
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
add ebx, 1
jmp case.0x1002d09e.5
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.0x1002d09e.5
mov edx, dword [esi + 0x38]
mov eax, ebx
shl eax, 0x10
add eax, 0xfffe0000
shr eax, 0x10
mov byte [edx], al
mov ecx, dword [esi + 0x38]
shr eax, 8
mov byte [ecx + 1], al
mov edi, ebx
and edi, 1
je case.0x1002d09e.5
mov eax, dword [esi + 0x38]
mov byte [eax + ebx], 0
add ebx, 1
jmp case.0x1002d09e.5
mov eax, dword [esi + 0x40]
test eax, eax
je 0x1002d331
mov edx, dword [esi + 0x3c]
sub edx, eax
add edx, 0xfffffffc
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x20], edx
jmp 0x1002d33d
lea eax, [ebx - 4]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x38]
movzx edx, byte [esi + 0x132]
test dl, 8
je 0x1002d35c
and edx, 0xfffffff7
mov byte [esi + 0x132], dl
mov edx, dword [ebp - 0x18]
neg edx
mov dword [ebp - 0x20], edx
jmp 0x1002d362
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x20], edx
movzx edx, byte [esi + 0x12d]
test dl, 8
je 0x1002d39a
lea edi, [ebp - 0x1d]
movzx edx, byte [edi]
mov dword [ebp - 0x10], edi
lea ecx, [ebp - 0x1e]
mov dword [ebp - 0x1c], ecx
mov byte [eax], dl
movzx edx, byte [ecx]
mov byte [eax + 1], dl
lea edx, [ebp - 0x1f]
mov dword [ebp - 0x14], edx
movzx edx, byte [edx]
mov byte [eax + 2], dl
movzx edx, byte [ebp - 0x20]
mov byte [eax + 3], dl
jmp 0x1002d3c4
movzx edx, byte [ebp - 0x20]
lea edi, [ebp - 0x1f]
movzx ecx, byte [edi]
mov dword [ebp - 0x14], edi
mov byte [eax], dl
mov byte [eax + 1], cl
lea edx, [ebp - 0x1e]
mov dword [ebp - 0x1c], edx
movzx edx, byte [edx]
mov byte [eax + 2], dl
lea edx, [ebp - 0x1d]
mov dword [ebp - 0x10], edx
movzx edx, byte [edx]
mov byte [eax + 3], dl
mov eax, dword [esi + 0x114]
test eax, eax
je 0x1002d3d8
mov eax, dword [ebp - 0x18]
neg eax
mov dword [ebp - 0x20], eax
jmp 0x1002d3de
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
movzx eax, byte [esi + 0x12d]
test al, 8
je 0x1002d418
mov edi, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
movzx eax, byte [edi]
mov edx, dword [esi + 0x3c]
mov byte [edx], al
movzx eax, byte [ecx]
mov edx, dword [esi + 0x3c]
mov byte [edx + 1], al
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax]
mov edx, dword [esi + 0x3c]
mov byte [edx + 2], al
movzx eax, byte [ebp - 0x20]
mov edx, dword [esi + 0x3c]
mov byte [edx + 3], al
jmp 0x1002d445
movzx eax, byte [ebp - 0x20]
mov edx, dword [ebp - 0x14]
mov edi, dword [esi + 0x3c]
movzx ecx, byte [edx]
mov byte [edi], al
mov eax, dword [esi + 0x3c]
mov byte [eax + 1], cl
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
mov edx, dword [esi + 0x3c]
mov byte [edx + 2], al
mov edx, dword [esi + 0x3c]
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax]
mov byte [edx + 3], al
add ebx, 4
jmp case.0x1002d09e.5
movzx ecx, byte [esi + 0x12d]
lea edi, [ebx - 4]
mov dword [ebp - 0x20], edi
mov eax, edi
and eax, 0xff
test cl, 8
je 0x1002d4a3
mov ecx, dword [esi + 0x38]
mov edx, edi
shr edx, 0x18
mov dword [ebp - 0x18], edx
mov byte [ecx], dl
mov edx, dword [esi + 0x38]
mov ecx, edi
shr ecx, 0x10
movzx ecx, cl
mov dword [ebp - 0x10], ecx
mov byte [edx + 1], cl
mov ecx, dword [esi + 0x38]
shr edi, 8
mov edx, edi
and edx, 0xff
mov dword [ebp - 0x14], edx
mov byte [ecx + 2], dl
mov edi, dword [esi + 0x38]
mov byte [edi + 3], al
jmp 0x1002d1b9
movzx eax, byte [ebp - 0x20]
movzx edx, byte [ebp - 0x1f]
mov edi, dword [esi + 0x38]
mov dword [ebp - 0x14], edx
mov byte [edi], al
mov ecx, dword [esi + 0x38]
mov byte [ecx + 1], dl
movzx ecx, byte [ebp - 0x1e]
mov edx, dword [esi + 0x38]
mov dword [ebp - 0x10], ecx
mov byte [edx + 2], cl
movzx edx, byte [ebp - 0x1d]
mov ecx, dword [esi + 0x38]
mov dword [ebp - 0x18], edx
mov byte [ecx + 3], dl
jmp 0x1002d1b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
mov dword [esi + 0xb8], 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.1002ccfc
jmp 0x1002d258
push 0x200
push esi
call fcn.10024784
add esp, 8
test eax, eax
je 0x1002d084
push 4
push esi
call fcn.10024784
add esp, 8
test eax, eax
je 0x1002d084
cmp ebx, dword [esi + 0xbc]
ja 0x1002d548
movsx edx, byte [esi + 0x11c]
cmp edx, 1
je 0x1002d08b
mov edx, dword [esi + 0x18]
test edx, edx
je 0x1002d5e6
movzx eax, byte [edx + 0x3c]
test al, 2
je 0x1002d587
mov eax, 0x42
mov dword [edx + 0x30], eax
mov edx, dword [esi + 0x18]
mov dword [edx + 0x34], eax
mov eax, dword [esi + 0x64]
test eax, eax
je 0x1002d578
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 ecx, byte [esi + 0x12b]
movzx ebx, byte [esi + 0x12c]
mov edx, ecx
and edx, 0x40
mov edi, 2
xor eax, eax
test edx, edx
setne al
test ecx, 0x80
jne 0x1002d5b3
mov edi, 0
test bl, 1
mov edx, 4
jne 0x1002d5c2
mov edx, 0
or eax, edi
or eax, edx
mov edx, 0x42
push edx
push edx
push eax
push 0xffffffffffffffff
push esi
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
push esi
mov eax, 0x42
push eax
push eax
push 1
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret